[2025-03-18 00:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:00:06
    [end_date_ymd] => 2025-03-18 00:00:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:00:06' and `end` < '2025-03-18 00: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-18 00:00:19] Production.INFO: count ==918  
[2025-03-18 00:00:19] Production.ERROR: pbx CDR StartTime 2025-03-17 21:00:06 - End Time 2025-03-18 00:00:06  
[2025-03-18 00:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704346', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704346', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704346', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704346', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:00:19] Production.INFO: ProcessCDR(1,14704346,1,1,2)  
[2025-03-18 00:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704346,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704346,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704346,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704346,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704346', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704346', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:00:24] Production.INFO: ==32397== Releasing lock...  
[2025-03-18 00:00:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:00:24] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 00:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:01:06
    [end_date_ymd] => 2025-03-18 00:01:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:01:06' and `end` < '2025-03-18 00: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-18 00:01:18] Production.INFO: count ==422  
[2025-03-18 00:01:19] Production.ERROR: pbx CDR StartTime 2025-03-17 21:01:06 - End Time 2025-03-18 00:01:06  
[2025-03-18 00:01:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704351', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704351', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:01:19] Production.INFO: ProcessCDR(1,14704351,1,1,2)  
[2025-03-18 00:01:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:01:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:01:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:01:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:01:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:01:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:01:24] Production.INFO: ==32492== Releasing lock...  
[2025-03-18 00:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:01:24] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 00:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:02:06
    [end_date_ymd] => 2025-03-18 00:02:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:02:06' and `end` < '2025-03-18 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-18 00:02:18] Production.INFO: count ==427  
[2025-03-18 00:02:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:02:06 - End Time 2025-03-18 00:02:06  
[2025-03-18 00:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704356', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704356', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704356', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704356', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:02:18] Production.INFO: ProcessCDR(1,14704356,1,1,2)  
[2025-03-18 00:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:02:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704356', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704356', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:02:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:02:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:02:23] Production.INFO: ==32566== Releasing lock...  
[2025-03-18 00:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:02:23] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:03:05
    [end_date_ymd] => 2025-03-18 00:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:03:05' and `end` < '2025-03-18 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-18 00:03:17] Production.INFO: count ==418  
[2025-03-18 00:03:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:03:05 - End Time 2025-03-18 00:03:05  
[2025-03-18 00:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704361', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704361', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704361', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704361', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:03:18] Production.INFO: ProcessCDR(1,14704361,1,1,2)  
[2025-03-18 00:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704361', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704361', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:03:21] Production.INFO: ==32638== Releasing lock...  
[2025-03-18 00:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:03:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:04:05
    [end_date_ymd] => 2025-03-18 00:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:04:05' and `end` < '2025-03-18 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-18 00:04:20] Production.INFO: count ==409  
[2025-03-18 00:04:21] Production.ERROR: pbx CDR StartTime 2025-03-17 21:04:05 - End Time 2025-03-18 00:04:05  
[2025-03-18 00:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704366', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704366', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:04:21] Production.INFO: ProcessCDR(1,14704366,1,1,2)  
[2025-03-18 00:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:04:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:04:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:04:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:04:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:04:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:04:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:04:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:04:24] Production.INFO: ==32715== Releasing lock...  
[2025-03-18 00:04:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:04:24] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:05:05
    [end_date_ymd] => 2025-03-18 00:05:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:05:05' and `end` < '2025-03-18 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-18 00:05:31] Production.INFO: count ==407  
[2025-03-18 00:05:31] Production.ERROR: pbx CDR StartTime 2025-03-17 21:05:05 - End Time 2025-03-18 00:05:05  
[2025-03-18 00:05:31] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:05:31] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:05:31] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:05:31] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704371', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:05:31] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704371', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:05:31] Production.INFO: ProcessCDR(1,14704371,1,1,2)  
[2025-03-18 00:05:31] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:05:34] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:05:34] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:05:36] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:05:36] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:05:36] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:05:36] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:05:36] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:05:36] Production.INFO: ==328== Releasing lock...  
[2025-03-18 00:05:36] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:05:36] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:06:06
    [end_date_ymd] => 2025-03-18 00:06:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:06:06' and `end` < '2025-03-18 00: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-18 00:06:24] Production.INFO: count ==409  
[2025-03-18 00:06:24] Production.ERROR: pbx CDR StartTime 2025-03-17 21:06:06 - End Time 2025-03-18 00:06:06  
[2025-03-18 00:06:24] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:06:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704376', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:06:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704376', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:06:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704376', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:06:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704376', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:06:24] Production.INFO: ProcessCDR(1,14704376,1,1,2)  
[2025-03-18 00:06:24] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:06:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:06:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:06:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704376', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704376', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:06:27] Production.INFO: ==417== Releasing lock...  
[2025-03-18 00:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:06:27] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:07:05
    [end_date_ymd] => 2025-03-18 00:07:05
    [RateCDR] => 1
)
  
[2025-03-18 00:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:07:05' and `end` < '2025-03-18 00:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:07:24] Production.INFO: count ==412  
[2025-03-18 00:07:24] Production.ERROR: pbx CDR StartTime 2025-03-17 21:07:05 - End Time 2025-03-18 00:07:05  
[2025-03-18 00:07:24] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:07:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704381', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:07:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704381', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:07:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704381', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:07:24] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704381', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:07:24] Production.INFO: ProcessCDR(1,14704381,1,1,2)  
[2025-03-18 00:07:24] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:07:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:07:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:07:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:07:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704381', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:07:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704381', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:07:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:07:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:07:28] Production.INFO: ==492== Releasing lock...  
[2025-03-18 00:07:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:07:28] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:08:05
    [end_date_ymd] => 2025-03-18 00:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:08:05' and `end` < '2025-03-18 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-18 00:08:26] Production.INFO: count ==416  
[2025-03-18 00:08:26] Production.ERROR: pbx CDR StartTime 2025-03-17 21:08:05 - End Time 2025-03-18 00:08:05  
[2025-03-18 00:08:26] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:08:26] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704386', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:08:26] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704386', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:08:26] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704386', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:08:26] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704386', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:08:26] Production.INFO: ProcessCDR(1,14704386,1,1,2)  
[2025-03-18 00:08:26] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:08:29] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:08:29] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:08:31] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:08:31] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704386', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:08:31] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704386', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:08:31] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:08:31] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:08:31] Production.INFO: ==576== Releasing lock...  
[2025-03-18 00:08:31] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:08:31] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:09:05
    [end_date_ymd] => 2025-03-18 00:09:05
    [RateCDR] => 1
)
  
[2025-03-18 00:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:09:05' and `end` < '2025-03-18 00:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:09:17] Production.INFO: count ==419  
[2025-03-18 00:09:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:09:05 - End Time 2025-03-18 00:09:05  
[2025-03-18 00:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704391', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704391', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704391', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704391', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:09:18] Production.INFO: ProcessCDR(1,14704391,1,1,2)  
[2025-03-18 00:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704391', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704391', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:09:21] Production.INFO: ==663== Releasing lock...  
[2025-03-18 00:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:09:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:10:06
    [end_date_ymd] => 2025-03-18 00:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:10:06' and `end` < '2025-03-18 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-18 00:10:19] Production.INFO: count ==423  
[2025-03-18 00:10:19] Production.ERROR: pbx CDR StartTime 2025-03-17 21:10:06 - End Time 2025-03-18 00:10:06  
[2025-03-18 00:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704397', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704397', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:10:19] Production.INFO: ProcessCDR(1,14704397,1,1,2)  
[2025-03-18 00:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:10:22] Production.INFO: ==763== Releasing lock...  
[2025-03-18 00:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:10:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:11:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:11:04
    [end_date_ymd] => 2025-03-18 00:11:04
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:11:04' and `end` < '2025-03-18 00: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-18 00:11:17] Production.INFO: count ==433  
[2025-03-18 00:11:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:11:04 - End Time 2025-03-18 00:11:04  
[2025-03-18 00:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704402', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704402', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:11:17] Production.INFO: ProcessCDR(1,14704402,1,1,2)  
[2025-03-18 00:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:11:20] Production.INFO: ==841== Releasing lock...  
[2025-03-18 00:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:11:20] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 00:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:12:06
    [end_date_ymd] => 2025-03-18 00:12:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:12:06' and `end` < '2025-03-18 00: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-18 00:12:18] Production.INFO: count ==432  
[2025-03-18 00:12:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:12:06 - End Time 2025-03-18 00:12:06  
[2025-03-18 00:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704407', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704407', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704407', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704407', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:12:18] Production.INFO: ProcessCDR(1,14704407,1,1,2)  
[2025-03-18 00:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:12:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704407', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704407', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:12:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:12:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:12:22] Production.INFO: ==917== Releasing lock...  
[2025-03-18 00:12:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:12:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:13:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:13:04
    [end_date_ymd] => 2025-03-18 00:13:04
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:13:04' and `end` < '2025-03-18 00: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-18 00:13:17] Production.INFO: count ==431  
[2025-03-18 00:13:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:13:04 - End Time 2025-03-18 00:13:04  
[2025-03-18 00:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704412', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704412', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704412', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704412', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:13:17] Production.INFO: ProcessCDR(1,14704412,1,1,2)  
[2025-03-18 00:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704412', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704412', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:13:20] Production.INFO: ==993== Releasing lock...  
[2025-03-18 00:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:13:20] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:14:05
    [end_date_ymd] => 2025-03-18 00:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:14:05' and `end` < '2025-03-18 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-18 00:14:17] Production.INFO: count ==424  
[2025-03-18 00:14:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:14:05 - End Time 2025-03-18 00:14:05  
[2025-03-18 00:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704417', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704417', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:14:17] Production.INFO: ProcessCDR(1,14704417,1,1,2)  
[2025-03-18 00:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:14:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:14:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:14:22] Production.INFO: ==1111== Releasing lock...  
[2025-03-18 00:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:14:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:15:05
    [end_date_ymd] => 2025-03-18 00:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:15:05' and `end` < '2025-03-18 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-18 00:15:17] Production.INFO: count ==424  
[2025-03-18 00:15:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:15:05 - End Time 2025-03-18 00:15:05  
[2025-03-18 00:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704422', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704422', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:15:17] Production.INFO: ProcessCDR(1,14704422,1,1,2)  
[2025-03-18 00:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:15:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:15:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:15:22] Production.INFO: ==1192== Releasing lock...  
[2025-03-18 00:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:15:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:16:06
    [end_date_ymd] => 2025-03-18 00:16:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:16:06' and `end` < '2025-03-18 00: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-18 00:16:18] Production.INFO: count ==422  
[2025-03-18 00:16:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:16:06 - End Time 2025-03-18 00:16:06  
[2025-03-18 00:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704427', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704427', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704427', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704427', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:16:18] Production.INFO: ProcessCDR(1,14704427,1,1,2)  
[2025-03-18 00:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704427', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704427', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:16:21] Production.INFO: ==1279== Releasing lock...  
[2025-03-18 00:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:16:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:17:06
    [end_date_ymd] => 2025-03-18 00:17:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:17:06' and `end` < '2025-03-18 00: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-18 00:17:18] Production.INFO: count ==419  
[2025-03-18 00:17:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:17:06 - End Time 2025-03-18 00:17:06  
[2025-03-18 00:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704432', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704432', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704432', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704432', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:17:18] Production.INFO: ProcessCDR(1,14704432,1,1,2)  
[2025-03-18 00:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:17:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704432', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704432', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:17:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:17:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:17:22] Production.INFO: ==1357== Releasing lock...  
[2025-03-18 00:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:17:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:18:05
    [end_date_ymd] => 2025-03-18 00:18:05
    [RateCDR] => 1
)
  
[2025-03-18 00:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:18:05' and `end` < '2025-03-18 00:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:18:17] Production.INFO: count ==415  
[2025-03-18 00:18:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:18:05 - End Time 2025-03-18 00:18:05  
[2025-03-18 00:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704437', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704437', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704437', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704437', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:18:17] Production.INFO: ProcessCDR(1,14704437,1,1,2)  
[2025-03-18 00:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704437', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704437', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:18:22] Production.INFO: ==1439== Releasing lock...  
[2025-03-18 00:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:18:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:19:05
    [end_date_ymd] => 2025-03-18 00:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:19:05' and `end` < '2025-03-18 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-18 00:19:18] Production.INFO: count ==415  
[2025-03-18 00:19:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:19:05 - End Time 2025-03-18 00:19:05  
[2025-03-18 00:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704442', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704442', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704442', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704442', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:19:18] Production.INFO: ProcessCDR(1,14704442,1,1,2)  
[2025-03-18 00:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704442', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704442', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:19:21] Production.INFO: ==1548== Releasing lock...  
[2025-03-18 00:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:19:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:20:06
    [end_date_ymd] => 2025-03-18 00:20:06
    [RateCDR] => 1
)
  
[2025-03-18 00:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:20:06' and `end` < '2025-03-18 00:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:20:18] Production.INFO: count ==423  
[2025-03-18 00:20:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:20:06 - End Time 2025-03-18 00:20:06  
[2025-03-18 00:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704447', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704447', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704447', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704447', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:20:18] Production.INFO: ProcessCDR(1,14704447,1,1,2)  
[2025-03-18 00:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704447', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704447', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:20:22] Production.INFO: ==1636== Releasing lock...  
[2025-03-18 00:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:20:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:21:05
    [end_date_ymd] => 2025-03-18 00:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:21:05' and `end` < '2025-03-18 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-18 00:21:18] Production.INFO: count ==431  
[2025-03-18 00:21:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:21:05 - End Time 2025-03-18 00:21:05  
[2025-03-18 00:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704453', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704453', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:21:18] Production.INFO: ProcessCDR(1,14704453,1,1,2)  
[2025-03-18 00:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:21:21] Production.INFO: ==1718== Releasing lock...  
[2025-03-18 00:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:21:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:22:05
    [end_date_ymd] => 2025-03-18 00:22:05
    [RateCDR] => 1
)
  
[2025-03-18 00:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:22:05' and `end` < '2025-03-18 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-18 00:22:17] Production.INFO: count ==433  
[2025-03-18 00:22:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:22:05 - End Time 2025-03-18 00:22:05  
[2025-03-18 00:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704458', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704458', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704458', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704458', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:22:17] Production.INFO: ProcessCDR(1,14704458,1,1,2)  
[2025-03-18 00:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704458', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704458', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:22:21] Production.INFO: ==1794== Releasing lock...  
[2025-03-18 00:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:22:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:23:05
    [end_date_ymd] => 2025-03-18 00:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:23:05' and `end` < '2025-03-18 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-18 00:23:17] Production.INFO: count ==432  
[2025-03-18 00:23:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:23:05 - End Time 2025-03-18 00:23:05  
[2025-03-18 00:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704463', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704463', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704463', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704463', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:23:18] Production.INFO: ProcessCDR(1,14704463,1,1,2)  
[2025-03-18 00:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704463', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704463', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:23:21] Production.INFO: ==1875== Releasing lock...  
[2025-03-18 00:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:23:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:24:05
    [end_date_ymd] => 2025-03-18 00:24:05
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:24:05' and `end` < '2025-03-18 00: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-18 00:24:18] Production.INFO: count ==429  
[2025-03-18 00:24:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:24:05 - End Time 2025-03-18 00:24:05  
[2025-03-18 00:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704468', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704468', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704468', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704468', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:24:18] Production.INFO: ProcessCDR(1,14704468,1,1,2)  
[2025-03-18 00:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704468', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704468', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:24:21] Production.INFO: ==1956== Releasing lock...  
[2025-03-18 00:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:24:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:25:05
    [end_date_ymd] => 2025-03-18 00:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:25:05' and `end` < '2025-03-18 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-18 00:25:17] Production.INFO: count ==433  
[2025-03-18 00:25:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:25:05 - End Time 2025-03-18 00:25:05  
[2025-03-18 00:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704473', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704473', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:25:17] Production.INFO: ProcessCDR(1,14704473,1,1,2)  
[2025-03-18 00:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:25:21] Production.INFO: ==2030== Releasing lock...  
[2025-03-18 00:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:25:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 00:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:26:05
    [end_date_ymd] => 2025-03-18 00:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:26:05' and `end` < '2025-03-18 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-18 00:26:17] Production.INFO: count ==431  
[2025-03-18 00:26:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:26:05 - End Time 2025-03-18 00:26:05  
[2025-03-18 00:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704478', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704478', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704478', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704478', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:26:17] Production.INFO: ProcessCDR(1,14704478,1,1,2)  
[2025-03-18 00:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704478', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704478', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:26:21] Production.INFO: ==2105== Releasing lock...  
[2025-03-18 00:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:26:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:27:06
    [end_date_ymd] => 2025-03-18 00:27:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:27:06' and `end` < '2025-03-18 00: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-18 00:27:18] Production.INFO: count ==434  
[2025-03-18 00:27:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:27:06 - End Time 2025-03-18 00:27:06  
[2025-03-18 00:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704483', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704483', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704483', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704483', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:27:18] Production.INFO: ProcessCDR(1,14704483,1,1,2)  
[2025-03-18 00:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704483', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704483', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:27:21] Production.INFO: ==2188== Releasing lock...  
[2025-03-18 00:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:27:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 00:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:28:06
    [end_date_ymd] => 2025-03-18 00:28:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:28:06' and `end` < '2025-03-18 00: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-18 00:28:18] Production.INFO: count ==428  
[2025-03-18 00:28:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:28:06 - End Time 2025-03-18 00:28:06  
[2025-03-18 00:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704488', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704488', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704488', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704488', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:28:18] Production.INFO: ProcessCDR(1,14704488,1,1,2)  
[2025-03-18 00:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:28:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704488', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704488', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:28:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:28:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:28:22] Production.INFO: ==2266== Releasing lock...  
[2025-03-18 00:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:28:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:29:05
    [end_date_ymd] => 2025-03-18 00:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:29:05' and `end` < '2025-03-18 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-18 00:29:17] Production.INFO: count ==432  
[2025-03-18 00:29:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:29:05 - End Time 2025-03-18 00:29:05  
[2025-03-18 00:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704493', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704493', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704493', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704493', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:29:17] Production.INFO: ProcessCDR(1,14704493,1,1,2)  
[2025-03-18 00:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704493', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704493', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:29:21] Production.INFO: ==2346== Releasing lock...  
[2025-03-18 00:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:29:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:30:06
    [end_date_ymd] => 2025-03-18 00:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:30:06' and `end` < '2025-03-18 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-18 00:30:19] Production.INFO: count ==437  
[2025-03-18 00:30:19] Production.ERROR: pbx CDR StartTime 2025-03-17 21:30:06 - End Time 2025-03-18 00:30:06  
[2025-03-18 00:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704498', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704498', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704498', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704498', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:30:19] Production.INFO: ProcessCDR(1,14704498,1,1,2)  
[2025-03-18 00:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704498', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704498', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:30:22] Production.INFO: ==2467== Releasing lock...  
[2025-03-18 00:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:30:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:31:05
    [end_date_ymd] => 2025-03-18 00:31:05
    [RateCDR] => 1
)
  
[2025-03-18 00:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:31:05' and `end` < '2025-03-18 00:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:31:17] Production.INFO: count ==437  
[2025-03-18 00:31:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:31:05 - End Time 2025-03-18 00:31:05  
[2025-03-18 00:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704504', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704504', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:31:17] Production.INFO: ProcessCDR(1,14704504,1,1,2)  
[2025-03-18 00:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:31:21] Production.INFO: ==2552== Releasing lock...  
[2025-03-18 00:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:31:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:32:06
    [end_date_ymd] => 2025-03-18 00:32:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:32:06' and `end` < '2025-03-18 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-18 00:32:18] Production.INFO: count ==431  
[2025-03-18 00:32:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:32:06 - End Time 2025-03-18 00:32:06  
[2025-03-18 00:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704509', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704509', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704509', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704509', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:32:18] Production.INFO: ProcessCDR(1,14704509,1,1,2)  
[2025-03-18 00:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:32:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:32:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:32:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:32:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704509', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:32:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704509', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:32:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:32:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:32:23] Production.INFO: ==2633== Releasing lock...  
[2025-03-18 00:32:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:32:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:33:05
    [end_date_ymd] => 2025-03-18 00:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:33:05' and `end` < '2025-03-18 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-18 00:33:17] Production.INFO: count ==429  
[2025-03-18 00:33:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:33:05 - End Time 2025-03-18 00:33:05  
[2025-03-18 00:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704514', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704514', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704514', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704514', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:33:17] Production.INFO: ProcessCDR(1,14704514,1,1,2)  
[2025-03-18 00:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704514', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704514', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:33:21] Production.INFO: ==2717== Releasing lock...  
[2025-03-18 00:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:33:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:34:06
    [end_date_ymd] => 2025-03-18 00:34:06
    [RateCDR] => 1
)
  
[2025-03-18 00:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:34:06' and `end` < '2025-03-18 00:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:34:18] Production.INFO: count ==424  
[2025-03-18 00:34:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:34:06 - End Time 2025-03-18 00:34:06  
[2025-03-18 00:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704519', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704519', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:34:18] Production.INFO: ProcessCDR(1,14704519,1,1,2)  
[2025-03-18 00:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:34:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:34:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:34:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:34:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:34:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:34:23] Production.INFO: ==2804== Releasing lock...  
[2025-03-18 00:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:34:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:35:05
    [end_date_ymd] => 2025-03-18 00:35:05
    [RateCDR] => 1
)
  
[2025-03-18 00:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:35:05' and `end` < '2025-03-18 00:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:35:18] Production.INFO: count ==420  
[2025-03-18 00:35:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:35:05 - End Time 2025-03-18 00:35:05  
[2025-03-18 00:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704524', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704524', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:35:18] Production.INFO: ProcessCDR(1,14704524,1,1,2)  
[2025-03-18 00:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:35:21] Production.INFO: ==2891== Releasing lock...  
[2025-03-18 00:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:35:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:36:06
    [end_date_ymd] => 2025-03-18 00:36:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:36:06' and `end` < '2025-03-18 00: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-18 00:36:18] Production.INFO: count ==431  
[2025-03-18 00:36:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:36:06 - End Time 2025-03-18 00:36:06  
[2025-03-18 00:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704529', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704529', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704529', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704529', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:36:18] Production.INFO: ProcessCDR(1,14704529,1,1,2)  
[2025-03-18 00:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:36:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:36:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704529', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704529', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:36:23] Production.INFO: ==2971== Releasing lock...  
[2025-03-18 00:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:36:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:37:05
    [end_date_ymd] => 2025-03-18 00:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:37:05' and `end` < '2025-03-18 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-18 00:37:17] Production.INFO: count ==425  
[2025-03-18 00:37:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:37:05 - End Time 2025-03-18 00:37:05  
[2025-03-18 00:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704534', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704534', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704534', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704534', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:37:18] Production.INFO: ProcessCDR(1,14704534,1,1,2)  
[2025-03-18 00:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704534', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704534', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:37:21] Production.INFO: ==3060== Releasing lock...  
[2025-03-18 00:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:37:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:38:06
    [end_date_ymd] => 2025-03-18 00:38:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:38:06' and `end` < '2025-03-18 00: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-18 00:38:18] Production.INFO: count ==424  
[2025-03-18 00:38:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:38:06 - End Time 2025-03-18 00:38:06  
[2025-03-18 00:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704539', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704539', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704539', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704539', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:38:18] Production.INFO: ProcessCDR(1,14704539,1,1,2)  
[2025-03-18 00:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704539', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704539', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:38:21] Production.INFO: ==3148== Releasing lock...  
[2025-03-18 00:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:38:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:39:05
    [end_date_ymd] => 2025-03-18 00:39:05
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:39:05' and `end` < '2025-03-18 00: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-18 00:39:17] Production.INFO: count ==426  
[2025-03-18 00:39:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:39:05 - End Time 2025-03-18 00:39:05  
[2025-03-18 00:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704544', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704544', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704544', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704544', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:39:17] Production.INFO: ProcessCDR(1,14704544,1,1,2)  
[2025-03-18 00:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704544', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704544', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:39:21] Production.INFO: ==3229== Releasing lock...  
[2025-03-18 00:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:39:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:40:06
    [end_date_ymd] => 2025-03-18 00:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:40:06' and `end` < '2025-03-18 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-18 00:40:19] Production.INFO: count ==427  
[2025-03-18 00:40:19] Production.ERROR: pbx CDR StartTime 2025-03-17 21:40:06 - End Time 2025-03-18 00:40:06  
[2025-03-18 00:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704550', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704550', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:40:19] Production.INFO: ProcessCDR(1,14704550,1,1,2)  
[2025-03-18 00:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:40:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:40:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:40:22] Production.INFO: ==3325== Releasing lock...  
[2025-03-18 00:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:40:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:41:05
    [end_date_ymd] => 2025-03-18 00:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:41:05' and `end` < '2025-03-18 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-18 00:41:17] Production.INFO: count ==424  
[2025-03-18 00:41:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:41:05 - End Time 2025-03-18 00:41:05  
[2025-03-18 00:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704555', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704555', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:41:17] Production.INFO: ProcessCDR(1,14704555,1,1,2)  
[2025-03-18 00:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:41:21] Production.INFO: ==3411== Releasing lock...  
[2025-03-18 00:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:41:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:42:05
    [end_date_ymd] => 2025-03-18 00:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:42:05' and `end` < '2025-03-18 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-18 00:42:17] Production.INFO: count ==423  
[2025-03-18 00:42:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:42:05 - End Time 2025-03-18 00:42:05  
[2025-03-18 00:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704560', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704560', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:42:18] Production.INFO: ProcessCDR(1,14704560,1,1,2)  
[2025-03-18 00:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:42:21] Production.INFO: ==3499== Releasing lock...  
[2025-03-18 00:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:42:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:43:05
    [end_date_ymd] => 2025-03-18 00:43:05
    [RateCDR] => 1
)
  
[2025-03-18 00:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:43:05' and `end` < '2025-03-18 00:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:43:17] Production.INFO: count ==425  
[2025-03-18 00:43:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:43:05 - End Time 2025-03-18 00:43:05  
[2025-03-18 00:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704565', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704565', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704565', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704565', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:43:17] Production.INFO: ProcessCDR(1,14704565,1,1,2)  
[2025-03-18 00:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704565', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704565', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:43:21] Production.INFO: ==3581== Releasing lock...  
[2025-03-18 00:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:43:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:44:06
    [end_date_ymd] => 2025-03-18 00:44:06
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:44:06' and `end` < '2025-03-18 00: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-18 00:44:18] Production.INFO: count ==410  
[2025-03-18 00:44:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:44:06 - End Time 2025-03-18 00:44:06  
[2025-03-18 00:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704570', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704570', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704570', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704570', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:44:18] Production.INFO: ProcessCDR(1,14704570,1,1,2)  
[2025-03-18 00:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:44:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:44:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704570', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704570', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:44:22] Production.INFO: ==3663== Releasing lock...  
[2025-03-18 00:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:44:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:45:05
    [end_date_ymd] => 2025-03-18 00:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:45:05' and `end` < '2025-03-18 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-18 00:45:17] Production.INFO: count ==410  
[2025-03-18 00:45:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:45:05 - End Time 2025-03-18 00:45:05  
[2025-03-18 00:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704575', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704575', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704575', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704575', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:45:17] Production.INFO: ProcessCDR(1,14704575,1,1,2)  
[2025-03-18 00:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704575', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704575', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:45:21] Production.INFO: ==3796== Releasing lock...  
[2025-03-18 00:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:45:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:46:05
    [end_date_ymd] => 2025-03-18 00:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:46:05' and `end` < '2025-03-18 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-18 00:46:18] Production.INFO: count ==409  
[2025-03-18 00:46:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:46:05 - End Time 2025-03-18 00:46:05  
[2025-03-18 00:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704580', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704580', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704580', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704580', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:46:18] Production.INFO: ProcessCDR(1,14704580,1,1,2)  
[2025-03-18 00:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704580', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704580', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:46:21] Production.INFO: ==3879== Releasing lock...  
[2025-03-18 00:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:46:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:47:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:47:04
    [end_date_ymd] => 2025-03-18 00:47:04
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:47:04' and `end` < '2025-03-18 00: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-18 00:47:17] Production.INFO: count ==409  
[2025-03-18 00:47:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:47:04 - End Time 2025-03-18 00:47:04  
[2025-03-18 00:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704585', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704585', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704585', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704585', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:47:17] Production.INFO: ProcessCDR(1,14704585,1,1,2)  
[2025-03-18 00:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704585', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704585', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:47:20] Production.INFO: ==3967== Releasing lock...  
[2025-03-18 00:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:47:20] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:48:05
    [end_date_ymd] => 2025-03-18 00:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:48:05' and `end` < '2025-03-18 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-18 00:48:17] Production.INFO: count ==412  
[2025-03-18 00:48:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:48:05 - End Time 2025-03-18 00:48:05  
[2025-03-18 00:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704590', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704590', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704590', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704590', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:48:18] Production.INFO: ProcessCDR(1,14704590,1,1,2)  
[2025-03-18 00:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704590', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704590', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:48:21] Production.INFO: ==4060== Releasing lock...  
[2025-03-18 00:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:48:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:49:05
    [end_date_ymd] => 2025-03-18 00:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:49:05' and `end` < '2025-03-18 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-18 00:49:17] Production.INFO: count ==412  
[2025-03-18 00:49:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:49:05 - End Time 2025-03-18 00:49:05  
[2025-03-18 00:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704595', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704595', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704595', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704595', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:49:17] Production.INFO: ProcessCDR(1,14704595,1,1,2)  
[2025-03-18 00:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704595', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704595', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:49:21] Production.INFO: ==4151== Releasing lock...  
[2025-03-18 00:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:49:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:50:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:50:05
    [end_date_ymd] => 2025-03-18 00:50:05
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:50:05' and `end` < '2025-03-18 00: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-18 00:50:18] Production.INFO: count ==417  
[2025-03-18 00:50:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:50:05 - End Time 2025-03-18 00:50:05  
[2025-03-18 00:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704601', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704601', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:50:18] Production.INFO: ProcessCDR(1,14704601,1,1,2)  
[2025-03-18 00:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:50:21] Production.INFO: ==4237== Releasing lock...  
[2025-03-18 00:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:50:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:51:05
    [end_date_ymd] => 2025-03-18 00:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:51:05' and `end` < '2025-03-18 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-18 00:51:18] Production.INFO: count ==423  
[2025-03-18 00:51:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:51:05 - End Time 2025-03-18 00:51:05  
[2025-03-18 00:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704606', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704606', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:51:18] Production.INFO: ProcessCDR(1,14704606,1,1,2)  
[2025-03-18 00:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:51:21] Production.INFO: ==4330== Releasing lock...  
[2025-03-18 00:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:51:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:52:05
    [end_date_ymd] => 2025-03-18 00:52:05
    [RateCDR] => 1
)
  
[2025-03-18 00:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 21:52:05' and `end` < '2025-03-18 00:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 00:52:17] Production.INFO: count ==425  
[2025-03-18 00:52:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:52:05 - End Time 2025-03-18 00:52:05  
[2025-03-18 00:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704611', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704611', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:52:18] Production.INFO: ProcessCDR(1,14704611,1,1,2)  
[2025-03-18 00:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:52:21] Production.INFO: ==4414== Releasing lock...  
[2025-03-18 00:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:52:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 00:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:53:05
    [end_date_ymd] => 2025-03-18 00:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:53:05' and `end` < '2025-03-18 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-18 00:53:18] Production.INFO: count ==422  
[2025-03-18 00:53:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:53:05 - End Time 2025-03-18 00:53:05  
[2025-03-18 00:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704616', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704616', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:53:18] Production.INFO: ProcessCDR(1,14704616,1,1,2)  
[2025-03-18 00:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:53:21] Production.INFO: ==4502== Releasing lock...  
[2025-03-18 00:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:53:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 00:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:54:05
    [end_date_ymd] => 2025-03-18 00:54:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:54:05' and `end` < '2025-03-18 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-18 00:54:17] Production.INFO: count ==426  
[2025-03-18 00:54:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:54:05 - End Time 2025-03-18 00:54:05  
[2025-03-18 00:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704621', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704621', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704621', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704621', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:54:17] Production.INFO: ProcessCDR(1,14704621,1,1,2)  
[2025-03-18 00:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704621', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704621', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:54:21] Production.INFO: ==4592== Releasing lock...  
[2025-03-18 00:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:54:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 00:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:55:05
    [end_date_ymd] => 2025-03-18 00:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:55:05' and `end` < '2025-03-18 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-18 00:55:18] Production.INFO: count ==425  
[2025-03-18 00:55:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:55:05 - End Time 2025-03-18 00:55:05  
[2025-03-18 00:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704626', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704626', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704626', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704626', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:55:18] Production.INFO: ProcessCDR(1,14704626,1,1,2)  
[2025-03-18 00:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704626', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704626', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:55:21] Production.INFO: ==4678== Releasing lock...  
[2025-03-18 00:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:55:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 00:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:56:06
    [end_date_ymd] => 2025-03-18 00:56:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:56:06' and `end` < '2025-03-18 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-18 00:56:18] Production.INFO: count ==425  
[2025-03-18 00:56:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:56:06 - End Time 2025-03-18 00:56:06  
[2025-03-18 00:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704631', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704631', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704631', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704631', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:56:18] Production.INFO: ProcessCDR(1,14704631,1,1,2)  
[2025-03-18 00:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704631', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704631', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:56:21] Production.INFO: ==4765== Releasing lock...  
[2025-03-18 00:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:56:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 00:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:57:05
    [end_date_ymd] => 2025-03-18 00:57:05
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:57:05' and `end` < '2025-03-18 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-18 00:57:18] Production.INFO: count ==430  
[2025-03-18 00:57:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:57:05 - End Time 2025-03-18 00:57:05  
[2025-03-18 00:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704636', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704636', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704636', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704636', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:57:18] Production.INFO: ProcessCDR(1,14704636,1,1,2)  
[2025-03-18 00:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704636', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704636', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:57:21] Production.INFO: ==4848== Releasing lock...  
[2025-03-18 00:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:57:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 00:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:58:05
    [end_date_ymd] => 2025-03-18 00:58:05
    [RateCDR] => 1
)
  
[2025-03-18 00: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-17 21:58:05' and `end` < '2025-03-18 00: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-18 00:58:17] Production.INFO: count ==429  
[2025-03-18 00:58:17] Production.ERROR: pbx CDR StartTime 2025-03-17 21:58:05 - End Time 2025-03-18 00:58:05  
[2025-03-18 00:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704641', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704641', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704641', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704641', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:58:17] Production.INFO: ProcessCDR(1,14704641,1,1,2)  
[2025-03-18 00:58:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704641', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704641', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:58:21] Production.INFO: ==4936== Releasing lock...  
[2025-03-18 00:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:58:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 00:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 21:59:05
    [end_date_ymd] => 2025-03-18 00:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 21:59:05' and `end` < '2025-03-18 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-18 00:59:17] Production.INFO: count ==429  
[2025-03-18 00:59:18] Production.ERROR: pbx CDR StartTime 2025-03-17 21:59:05 - End Time 2025-03-18 00:59:05  
[2025-03-18 00:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 00:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704646', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704646', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704646', 'tblTempVendorCDR_20' ) start  
[2025-03-18 00:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704646', 'tblTempVendorCDR_20' ) end  
[2025-03-18 00:59:18] Production.INFO: ProcessCDR(1,14704646,1,1,2)  
[2025-03-18 00:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 00:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 00:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704646', 'tblTempUsageDetail_20' ) start  
[2025-03-18 00:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704646', 'tblTempUsageDetail_20' ) end  
[2025-03-18 00:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 00:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 00:59:21] Production.INFO: ==5021== Releasing lock...  
[2025-03-18 00:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 00:59:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:00:06
    [end_date_ymd] => 2025-03-18 01:00:06
    [RateCDR] => 1
)
  
[2025-03-18 01:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:00:06' and `end` < '2025-03-18 01:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:00:19] Production.INFO: count ==439  
[2025-03-18 01:00:19] Production.ERROR: pbx CDR StartTime 2025-03-17 22:00:06 - End Time 2025-03-18 01:00:06  
[2025-03-18 01:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704652', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704652', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:00:19] Production.INFO: ProcessCDR(1,14704652,1,1,2)  
[2025-03-18 01:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:00:22] Production.INFO: ==5116== Releasing lock...  
[2025-03-18 01:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:00:22] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:01:05
    [end_date_ymd] => 2025-03-18 01:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:01:05' and `end` < '2025-03-18 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-18 01:01:17] Production.INFO: count ==443  
[2025-03-18 01:01:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:01:05 - End Time 2025-03-18 01:01:05  
[2025-03-18 01:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704657', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704657', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:01:18] Production.INFO: ProcessCDR(1,14704657,1,1,2)  
[2025-03-18 01:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:01:21] Production.INFO: ==5257== Releasing lock...  
[2025-03-18 01:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:01:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 01:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:02:06
    [end_date_ymd] => 2025-03-18 01:02:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:02:06' and `end` < '2025-03-18 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-18 01:02:18] Production.INFO: count ==435  
[2025-03-18 01:02:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:02:06 - End Time 2025-03-18 01:02:06  
[2025-03-18 01:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704662', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704662', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:02:18] Production.INFO: ProcessCDR(1,14704662,1,1,2)  
[2025-03-18 01:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:02:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:02:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:02:22] Production.INFO: ==5347== Releasing lock...  
[2025-03-18 01:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:02:22] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:03:05
    [end_date_ymd] => 2025-03-18 01:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:03:05' and `end` < '2025-03-18 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-18 01:03:17] Production.INFO: count ==409  
[2025-03-18 01:03:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:03:05 - End Time 2025-03-18 01:03:05  
[2025-03-18 01:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704667', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704667', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:03:17] Production.INFO: ProcessCDR(1,14704667,1,1,2)  
[2025-03-18 01:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:03:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:03:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:03:22] Production.INFO: ==5429== Releasing lock...  
[2025-03-18 01:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:03:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:04:06
    [end_date_ymd] => 2025-03-18 01:04:06
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:04:06' and `end` < '2025-03-18 01: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-18 01:04:18] Production.INFO: count ==398  
[2025-03-18 01:04:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:04:06 - End Time 2025-03-18 01:04:06  
[2025-03-18 01:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704672', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704672', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704672', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704672', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:04:18] Production.INFO: ProcessCDR(1,14704672,1,1,2)  
[2025-03-18 01:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704672', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704672', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:04:22] Production.INFO: ==5512== Releasing lock...  
[2025-03-18 01:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:04:22] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:05:05
    [end_date_ymd] => 2025-03-18 01:05:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:05:05' and `end` < '2025-03-18 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-18 01:05:17] Production.INFO: count ==396  
[2025-03-18 01:05:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:05:05 - End Time 2025-03-18 01:05:05  
[2025-03-18 01:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704677', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704677', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704677', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704677', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:05:17] Production.INFO: ProcessCDR(1,14704677,1,1,2)  
[2025-03-18 01:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:05:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:05:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704677', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704677', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:05:22] Production.INFO: ==5596== Releasing lock...  
[2025-03-18 01:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:05:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:06:06
    [end_date_ymd] => 2025-03-18 01:06:06
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:06:06' and `end` < '2025-03-18 01: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-18 01:06:18] Production.INFO: count ==391  
[2025-03-18 01:06:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:06:06 - End Time 2025-03-18 01:06:06  
[2025-03-18 01:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704682', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704682', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704682', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704682', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:06:18] Production.INFO: ProcessCDR(1,14704682,1,1,2)  
[2025-03-18 01:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704682', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704682', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:06:22] Production.INFO: ==5680== Releasing lock...  
[2025-03-18 01:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:06:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:07:05
    [end_date_ymd] => 2025-03-18 01:07:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:07:05' and `end` < '2025-03-18 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-18 01:07:17] Production.INFO: count ==390  
[2025-03-18 01:07:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:07:05 - End Time 2025-03-18 01:07:05  
[2025-03-18 01:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704687', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704687', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704687', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704687', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:07:18] Production.INFO: ProcessCDR(1,14704687,1,1,2)  
[2025-03-18 01:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704687', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704687', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:07:21] Production.INFO: ==5761== Releasing lock...  
[2025-03-18 01:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:07:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:08:05
    [end_date_ymd] => 2025-03-18 01:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:08:05' and `end` < '2025-03-18 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-18 01:08:17] Production.INFO: count ==389  
[2025-03-18 01:08:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:08:05 - End Time 2025-03-18 01:08:05  
[2025-03-18 01:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704692', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704692', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704692', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704692', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:08:18] Production.INFO: ProcessCDR(1,14704692,1,1,2)  
[2025-03-18 01:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704692', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704692', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:08:21] Production.INFO: ==5840== Releasing lock...  
[2025-03-18 01:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:08:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:09:05
    [end_date_ymd] => 2025-03-18 01:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:09:05' and `end` < '2025-03-18 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-18 01:09:17] Production.INFO: count ==388  
[2025-03-18 01:09:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:09:05 - End Time 2025-03-18 01:09:05  
[2025-03-18 01:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704697', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704697', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704697', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704697', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:09:17] Production.INFO: ProcessCDR(1,14704697,1,1,2)  
[2025-03-18 01:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704697', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704697', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:09:21] Production.INFO: ==5920== Releasing lock...  
[2025-03-18 01:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:09:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:10:06
    [end_date_ymd] => 2025-03-18 01:10:06
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:10:06' and `end` < '2025-03-18 01: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-18 01:10:18] Production.INFO: count ==402  
[2025-03-18 01:10:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:10:06 - End Time 2025-03-18 01:10:06  
[2025-03-18 01:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704702', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704702', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704702', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704702', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:10:18] Production.INFO: ProcessCDR(1,14704702,1,1,2)  
[2025-03-18 01:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704702,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704702,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704702', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704702', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:10:22] Production.INFO: ==6001== Releasing lock...  
[2025-03-18 01:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:10:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:11:05
    [end_date_ymd] => 2025-03-18 01:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:11:05' and `end` < '2025-03-18 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-18 01:11:17] Production.INFO: count ==402  
[2025-03-18 01:11:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:11:05 - End Time 2025-03-18 01:11:05  
[2025-03-18 01:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704708', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704708', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:11:17] Production.INFO: ProcessCDR(1,14704708,1,1,2)  
[2025-03-18 01:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:11:21] Production.INFO: ==6077== Releasing lock...  
[2025-03-18 01:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:11:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:12:06
    [end_date_ymd] => 2025-03-18 01:12:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:12:06' and `end` < '2025-03-18 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-18 01:12:18] Production.INFO: count ==404  
[2025-03-18 01:12:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:12:06 - End Time 2025-03-18 01:12:06  
[2025-03-18 01:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704713', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704713', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:12:18] Production.INFO: ProcessCDR(1,14704713,1,1,2)  
[2025-03-18 01:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:12:21] Production.INFO: ==6161== Releasing lock...  
[2025-03-18 01:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:12:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:13:05
    [end_date_ymd] => 2025-03-18 01:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:13:05' and `end` < '2025-03-18 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-18 01:13:17] Production.INFO: count ==403  
[2025-03-18 01:13:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:13:05 - End Time 2025-03-18 01:13:05  
[2025-03-18 01:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704718', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704718', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704718', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704718', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:13:17] Production.INFO: ProcessCDR(1,14704718,1,1,2)  
[2025-03-18 01:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:13:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704718', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:13:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704718', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:13:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:13:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:13:20] Production.INFO: ==6240== Releasing lock...  
[2025-03-18 01:13:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:13:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 01:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:14:05
    [end_date_ymd] => 2025-03-18 01:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:14:05' and `end` < '2025-03-18 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-18 01:14:18] Production.INFO: count ==400  
[2025-03-18 01:14:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:14:05 - End Time 2025-03-18 01:14:05  
[2025-03-18 01:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704723', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704723', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704723', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704723', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:14:18] Production.INFO: ProcessCDR(1,14704723,1,1,2)  
[2025-03-18 01:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704723', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704723', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:14:21] Production.INFO: ==6319== Releasing lock...  
[2025-03-18 01:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:14:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:15:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:15:04
    [end_date_ymd] => 2025-03-18 01:15:04
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:15:04' and `end` < '2025-03-18 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-18 01:15:17] Production.INFO: count ==397  
[2025-03-18 01:15:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:15:04 - End Time 2025-03-18 01:15:04  
[2025-03-18 01:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704728', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704728', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704728', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704728', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:15:17] Production.INFO: ProcessCDR(1,14704728,1,1,2)  
[2025-03-18 01:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704728', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704728', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:15:20] Production.INFO: ==6401== Releasing lock...  
[2025-03-18 01:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:15:20] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:16:05
    [end_date_ymd] => 2025-03-18 01:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:16:05' and `end` < '2025-03-18 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-18 01:16:18] Production.INFO: count ==392  
[2025-03-18 01:16:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:16:05 - End Time 2025-03-18 01:16:05  
[2025-03-18 01:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704733', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704733', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704733', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704733', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:16:18] Production.INFO: ProcessCDR(1,14704733,1,1,2)  
[2025-03-18 01:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704733', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704733', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:16:21] Production.INFO: ==6518== Releasing lock...  
[2025-03-18 01:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:16:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:17:05
    [end_date_ymd] => 2025-03-18 01:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:17:05' and `end` < '2025-03-18 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-18 01:17:17] Production.INFO: count ==388  
[2025-03-18 01:17:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:17:05 - End Time 2025-03-18 01:17:05  
[2025-03-18 01:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704738', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704738', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704738', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704738', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:17:18] Production.INFO: ProcessCDR(1,14704738,1,1,2)  
[2025-03-18 01:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704738', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704738', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:17:21] Production.INFO: ==6595== Releasing lock...  
[2025-03-18 01:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:17:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:18:05
    [end_date_ymd] => 2025-03-18 01:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:18:05' and `end` < '2025-03-18 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-18 01:18:17] Production.INFO: count ==388  
[2025-03-18 01:18:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:18:05 - End Time 2025-03-18 01:18:05  
[2025-03-18 01:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704743', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704743', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704743', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704743', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:18:17] Production.INFO: ProcessCDR(1,14704743,1,1,2)  
[2025-03-18 01:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704743', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704743', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:18:21] Production.INFO: ==6690== Releasing lock...  
[2025-03-18 01:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:18:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:19:06
    [end_date_ymd] => 2025-03-18 01:19:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:19:06' and `end` < '2025-03-18 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-18 01:19:18] Production.INFO: count ==385  
[2025-03-18 01:19:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:19:06 - End Time 2025-03-18 01:19:06  
[2025-03-18 01:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704748', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704748', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704748', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704748', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:19:18] Production.INFO: ProcessCDR(1,14704748,1,1,2)  
[2025-03-18 01:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704748', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704748', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:19:21] Production.INFO: ==6771== Releasing lock...  
[2025-03-18 01:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:19:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:20:06
    [end_date_ymd] => 2025-03-18 01:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:20:06' and `end` < '2025-03-18 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-18 01:20:18] Production.INFO: count ==391  
[2025-03-18 01:20:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:20:06 - End Time 2025-03-18 01:20:06  
[2025-03-18 01:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704753', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704753', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704753', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704753', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:20:18] Production.INFO: ProcessCDR(1,14704753,1,1,2)  
[2025-03-18 01:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704753,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704753,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704753', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704753', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:20:21] Production.INFO: ==6849== Releasing lock...  
[2025-03-18 01:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:20:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:21:05
    [end_date_ymd] => 2025-03-18 01:21:05
    [RateCDR] => 1
)
  
[2025-03-18 01:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:21:05' and `end` < '2025-03-18 01:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:21:18] Production.INFO: count ==390  
[2025-03-18 01:21:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:21:05 - End Time 2025-03-18 01:21:05  
[2025-03-18 01:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704759', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704759', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:21:18] Production.INFO: ProcessCDR(1,14704759,1,1,2)  
[2025-03-18 01:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:21:21] Production.INFO: ==6931== Releasing lock...  
[2025-03-18 01:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:21:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:22:05
    [end_date_ymd] => 2025-03-18 01:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:22:05' and `end` < '2025-03-18 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-18 01:22:17] Production.INFO: count ==391  
[2025-03-18 01:22:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:22:05 - End Time 2025-03-18 01:22:05  
[2025-03-18 01:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704764', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704764', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:22:18] Production.INFO: ProcessCDR(1,14704764,1,1,2)  
[2025-03-18 01:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:22:21] Production.INFO: ==7008== Releasing lock...  
[2025-03-18 01:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:22:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:23:05
    [end_date_ymd] => 2025-03-18 01:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:23:05' and `end` < '2025-03-18 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-18 01:23:17] Production.INFO: count ==393  
[2025-03-18 01:23:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:23:05 - End Time 2025-03-18 01:23:05  
[2025-03-18 01:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704769', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704769', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704769', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704769', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:23:18] Production.INFO: ProcessCDR(1,14704769,1,1,2)  
[2025-03-18 01:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704769', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704769', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:23:21] Production.INFO: ==7087== Releasing lock...  
[2025-03-18 01:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:23:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:24:05
    [end_date_ymd] => 2025-03-18 01:24:05
    [RateCDR] => 1
)
  
[2025-03-18 01:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:24:05' and `end` < '2025-03-18 01:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:24:17] Production.INFO: count ==392  
[2025-03-18 01:24:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:24:05 - End Time 2025-03-18 01:24:05  
[2025-03-18 01:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704774', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704774', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704774', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704774', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:24:17] Production.INFO: ProcessCDR(1,14704774,1,1,2)  
[2025-03-18 01:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704774', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704774', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:24:21] Production.INFO: ==7160== Releasing lock...  
[2025-03-18 01:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:24:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:25:05
    [end_date_ymd] => 2025-03-18 01:25:05
    [RateCDR] => 1
)
  
[2025-03-18 01:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:25:05' and `end` < '2025-03-18 01:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:25:17] Production.INFO: count ==394  
[2025-03-18 01:25:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:25:05 - End Time 2025-03-18 01:25:05  
[2025-03-18 01:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704779', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704779', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704779', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704779', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:25:18] Production.INFO: ProcessCDR(1,14704779,1,1,2)  
[2025-03-18 01:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704779', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704779', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:25:21] Production.INFO: ==7237== Releasing lock...  
[2025-03-18 01:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:25:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:26:05
    [end_date_ymd] => 2025-03-18 01:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:26:05' and `end` < '2025-03-18 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-18 01:26:17] Production.INFO: count ==393  
[2025-03-18 01:26:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:26:05 - End Time 2025-03-18 01:26:05  
[2025-03-18 01:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704784', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704784', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704784', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704784', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:26:18] Production.INFO: ProcessCDR(1,14704784,1,1,2)  
[2025-03-18 01:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704784', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704784', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:26:21] Production.INFO: ==7317== Releasing lock...  
[2025-03-18 01:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:26:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:27:06
    [end_date_ymd] => 2025-03-18 01:27:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:27:06' and `end` < '2025-03-18 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-18 01:27:18] Production.INFO: count ==397  
[2025-03-18 01:27:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:27:06 - End Time 2025-03-18 01:27:06  
[2025-03-18 01:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704789', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704789', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704789', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704789', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:27:18] Production.INFO: ProcessCDR(1,14704789,1,1,2)  
[2025-03-18 01:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704789', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704789', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:27:21] Production.INFO: ==7397== Releasing lock...  
[2025-03-18 01:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:27:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:28:05
    [end_date_ymd] => 2025-03-18 01:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:28:05' and `end` < '2025-03-18 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-18 01:28:17] Production.INFO: count ==397  
[2025-03-18 01:28:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:28:05 - End Time 2025-03-18 01:28:05  
[2025-03-18 01:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704794', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704794', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704794', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704794', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:28:17] Production.INFO: ProcessCDR(1,14704794,1,1,2)  
[2025-03-18 01:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704794', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704794', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:28:21] Production.INFO: ==7476== Releasing lock...  
[2025-03-18 01:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:28:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:29:05
    [end_date_ymd] => 2025-03-18 01:29:05
    [RateCDR] => 1
)
  
[2025-03-18 01:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:29:05' and `end` < '2025-03-18 01:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:29:17] Production.INFO: count ==399  
[2025-03-18 01:29:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:29:05 - End Time 2025-03-18 01:29:05  
[2025-03-18 01:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704799', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704799', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704799', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704799', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:29:17] Production.INFO: ProcessCDR(1,14704799,1,1,2)  
[2025-03-18 01:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704799', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704799', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:29:21] Production.INFO: ==7553== Releasing lock...  
[2025-03-18 01:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:29:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:30:05
    [end_date_ymd] => 2025-03-18 01:30:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:30:05' and `end` < '2025-03-18 01: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-18 01:30:18] Production.INFO: count ==408  
[2025-03-18 01:30:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:30:05 - End Time 2025-03-18 01:30:05  
[2025-03-18 01:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704804', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704804', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704804', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704804', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:30:18] Production.INFO: ProcessCDR(1,14704804,1,1,2)  
[2025-03-18 01:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704804', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704804', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:30:21] Production.INFO: ==7633== Releasing lock...  
[2025-03-18 01:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:30:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:31:05
    [end_date_ymd] => 2025-03-18 01:31:05
    [RateCDR] => 1
)
  
[2025-03-18 01:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:31:05' and `end` < '2025-03-18 01:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:31:18] Production.INFO: count ==414  
[2025-03-18 01:31:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:31:05 - End Time 2025-03-18 01:31:05  
[2025-03-18 01:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704810', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704810', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:31:18] Production.INFO: ProcessCDR(1,14704810,1,1,2)  
[2025-03-18 01:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:31:21] Production.INFO: ==7714== Releasing lock...  
[2025-03-18 01:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:31:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:32:05
    [end_date_ymd] => 2025-03-18 01:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:32:05' and `end` < '2025-03-18 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-18 01:32:17] Production.INFO: count ==417  
[2025-03-18 01:32:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:32:05 - End Time 2025-03-18 01:32:05  
[2025-03-18 01:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704815', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704815', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:32:17] Production.INFO: ProcessCDR(1,14704815,1,1,2)  
[2025-03-18 01:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:32:21] Production.INFO: ==7834== Releasing lock...  
[2025-03-18 01:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:32:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:33:04
    [end_date_ymd] => 2025-03-18 01:33:04
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:33:04' and `end` < '2025-03-18 01: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-18 01:33:17] Production.INFO: count ==418  
[2025-03-18 01:33:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:33:04 - End Time 2025-03-18 01:33:04  
[2025-03-18 01:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704816', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704816', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704816', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704816', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:33:17] Production.INFO: ProcessCDR(1,14704816,1,1,2)  
[2025-03-18 01:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704816', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704816', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:33:20] Production.INFO: ==7909== Releasing lock...  
[2025-03-18 01:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:33:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:34:05
    [end_date_ymd] => 2025-03-18 01:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:34:05' and `end` < '2025-03-18 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-18 01:34:18] Production.INFO: count ==420  
[2025-03-18 01:34:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:34:05 - End Time 2025-03-18 01:34:05  
[2025-03-18 01:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704825', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704825', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704825', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704825', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:34:18] Production.INFO: ProcessCDR(1,14704825,1,1,2)  
[2025-03-18 01:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704825', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704825', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:34:21] Production.INFO: ==7989== Releasing lock...  
[2025-03-18 01:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:34:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:35:05
    [end_date_ymd] => 2025-03-18 01:35:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:35:05' and `end` < '2025-03-18 01: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-18 01:35:17] Production.INFO: count ==419  
[2025-03-18 01:35:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:35:05 - End Time 2025-03-18 01:35:05  
[2025-03-18 01:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704830', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704830', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704830', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704830', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:35:17] Production.INFO: ProcessCDR(1,14704830,1,1,2)  
[2025-03-18 01:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704830', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704830', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:35:21] Production.INFO: ==8064== Releasing lock...  
[2025-03-18 01:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:35:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:36:05
    [end_date_ymd] => 2025-03-18 01:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:36:05' and `end` < '2025-03-18 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-18 01:36:17] Production.INFO: count ==416  
[2025-03-18 01:36:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:36:05 - End Time 2025-03-18 01:36:05  
[2025-03-18 01:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704835', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704835', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704835', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704835', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:36:17] Production.INFO: ProcessCDR(1,14704835,1,1,2)  
[2025-03-18 01:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704835', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704835', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:36:21] Production.INFO: ==8142== Releasing lock...  
[2025-03-18 01:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:36:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:37:05
    [end_date_ymd] => 2025-03-18 01:37:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:37:05' and `end` < '2025-03-18 01: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-18 01:37:17] Production.INFO: count ==430  
[2025-03-18 01:37:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:37:05 - End Time 2025-03-18 01:37:05  
[2025-03-18 01:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704840', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704840', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704840', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704840', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:37:17] Production.INFO: ProcessCDR(1,14704840,1,1,2)  
[2025-03-18 01:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704840', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704840', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:37:21] Production.INFO: ==8230== Releasing lock...  
[2025-03-18 01:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:37:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 01:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:38:05
    [end_date_ymd] => 2025-03-18 01:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:38:05' and `end` < '2025-03-18 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-18 01:38:18] Production.INFO: count ==432  
[2025-03-18 01:38:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:38:05 - End Time 2025-03-18 01:38:05  
[2025-03-18 01:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704845', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704845', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704845', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704845', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:38:18] Production.INFO: ProcessCDR(1,14704845,1,1,2)  
[2025-03-18 01:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704845', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704845', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:38:21] Production.INFO: ==8307== Releasing lock...  
[2025-03-18 01:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:38:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 01:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:39:05
    [end_date_ymd] => 2025-03-18 01:39:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:39:05' and `end` < '2025-03-18 01: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-18 01:39:17] Production.INFO: count ==438  
[2025-03-18 01:39:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:39:05 - End Time 2025-03-18 01:39:05  
[2025-03-18 01:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704850', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704850', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704850', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704850', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:39:17] Production.INFO: ProcessCDR(1,14704850,1,1,2)  
[2025-03-18 01:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704850', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704850', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:39:20] Production.INFO: ==8390== Releasing lock...  
[2025-03-18 01:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:39:20] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:40:06
    [end_date_ymd] => 2025-03-18 01:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:40:06' and `end` < '2025-03-18 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-18 01:40:18] Production.INFO: count ==444  
[2025-03-18 01:40:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:40:06 - End Time 2025-03-18 01:40:06  
[2025-03-18 01:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704856', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704856', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704856', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704856', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:40:18] Production.INFO: ProcessCDR(1,14704856,1,1,2)  
[2025-03-18 01:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704856', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704856', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:40:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:40:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:40:23] Production.INFO: ==8466== Releasing lock...  
[2025-03-18 01:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:40:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:41:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:41:04
    [end_date_ymd] => 2025-03-18 01:41:04
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:41:04' and `end` < '2025-03-18 01: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-18 01:41:16] Production.INFO: count ==443  
[2025-03-18 01:41:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:41:04 - End Time 2025-03-18 01:41:04  
[2025-03-18 01:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704861', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704861', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:41:17] Production.INFO: ProcessCDR(1,14704861,1,1,2)  
[2025-03-18 01:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:41:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:41:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:41:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:41:20] Production.INFO: ==8544== Releasing lock...  
[2025-03-18 01:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:41:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:42:05
    [end_date_ymd] => 2025-03-18 01:42:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:42:05' and `end` < '2025-03-18 01: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-18 01:42:17] Production.INFO: count ==449  
[2025-03-18 01:42:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:42:05 - End Time 2025-03-18 01:42:05  
[2025-03-18 01:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704866', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704866', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704866', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704866', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:42:17] Production.INFO: ProcessCDR(1,14704866,1,1,2)  
[2025-03-18 01:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704866', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704866', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:42:21] Production.INFO: ==8624== Releasing lock...  
[2025-03-18 01:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:42:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 01:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:43:05
    [end_date_ymd] => 2025-03-18 01:43:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:43:05' and `end` < '2025-03-18 01: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-18 01:43:18] Production.INFO: count ==448  
[2025-03-18 01:43:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:43:05 - End Time 2025-03-18 01:43:05  
[2025-03-18 01:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704871', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704871', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704871', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704871', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:43:18] Production.INFO: ProcessCDR(1,14704871,1,1,2)  
[2025-03-18 01:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704871', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704871', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:43:21] Production.INFO: ==8700== Releasing lock...  
[2025-03-18 01:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:43:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:44:05
    [end_date_ymd] => 2025-03-18 01:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:44:05' and `end` < '2025-03-18 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-18 01:44:17] Production.INFO: count ==446  
[2025-03-18 01:44:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:44:05 - End Time 2025-03-18 01:44:05  
[2025-03-18 01:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704876', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704876', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704876', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704876', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:44:17] Production.INFO: ProcessCDR(1,14704876,1,1,2)  
[2025-03-18 01:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704876', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704876', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:44:21] Production.INFO: ==8775== Releasing lock...  
[2025-03-18 01:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:44:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:45:06
    [end_date_ymd] => 2025-03-18 01:45:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:45:06' and `end` < '2025-03-18 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-18 01:45:18] Production.INFO: count ==440  
[2025-03-18 01:45:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:45:06 - End Time 2025-03-18 01:45:06  
[2025-03-18 01:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704881', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704881', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704881', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704881', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:45:18] Production.INFO: ProcessCDR(1,14704881,1,1,2)  
[2025-03-18 01:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704881', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704881', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:45:21] Production.INFO: ==8854== Releasing lock...  
[2025-03-18 01:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:45:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:46:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:46:04
    [end_date_ymd] => 2025-03-18 01:46:04
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:46:04' and `end` < '2025-03-18 01: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-18 01:46:17] Production.INFO: count ==438  
[2025-03-18 01:46:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:46:04 - End Time 2025-03-18 01:46:04  
[2025-03-18 01:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704886', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704886', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704886', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704886', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:46:17] Production.INFO: ProcessCDR(1,14704886,1,1,2)  
[2025-03-18 01:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704886', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704886', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:46:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:46:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:46:20] Production.INFO: ==8926== Releasing lock...  
[2025-03-18 01:46:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:46:20] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:47:05
    [end_date_ymd] => 2025-03-18 01:47:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:47:05' and `end` < '2025-03-18 01: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-18 01:47:17] Production.INFO: count ==431  
[2025-03-18 01:47:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:47:05 - End Time 2025-03-18 01:47:05  
[2025-03-18 01:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704891', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704891', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704891', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704891', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:47:17] Production.INFO: ProcessCDR(1,14704891,1,1,2)  
[2025-03-18 01:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:47:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:47:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:47:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704891', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:47:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704891', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:47:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:47:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:47:20] Production.INFO: ==9041== Releasing lock...  
[2025-03-18 01:47:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:47:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:48:05
    [end_date_ymd] => 2025-03-18 01:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:48:05' and `end` < '2025-03-18 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-18 01:48:17] Production.INFO: count ==428  
[2025-03-18 01:48:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:48:05 - End Time 2025-03-18 01:48:05  
[2025-03-18 01:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704896', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704896', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704896', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704896', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:48:17] Production.INFO: ProcessCDR(1,14704896,1,1,2)  
[2025-03-18 01:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704896', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704896', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:48:21] Production.INFO: ==9110== Releasing lock...  
[2025-03-18 01:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:48:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:49:05
    [end_date_ymd] => 2025-03-18 01:49:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:49:05' and `end` < '2025-03-18 01: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-18 01:49:18] Production.INFO: count ==428  
[2025-03-18 01:49:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:49:05 - End Time 2025-03-18 01:49:05  
[2025-03-18 01:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704901', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704901', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704901', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704901', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:49:18] Production.INFO: ProcessCDR(1,14704901,1,1,2)  
[2025-03-18 01:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704901', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704901', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:49:21] Production.INFO: ==9183== Releasing lock...  
[2025-03-18 01:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:49:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 01:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:50:06
    [end_date_ymd] => 2025-03-18 01:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:50:06' and `end` < '2025-03-18 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-18 01:50:18] Production.INFO: count ==431  
[2025-03-18 01:50:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:50:06 - End Time 2025-03-18 01:50:06  
[2025-03-18 01:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704907', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704907', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:50:18] Production.INFO: ProcessCDR(1,14704907,1,1,2)  
[2025-03-18 01:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:50:22] Production.INFO: ==9257== Releasing lock...  
[2025-03-18 01:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:50:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:51:06
    [end_date_ymd] => 2025-03-18 01:51:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:51:06' and `end` < '2025-03-18 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-18 01:51:18] Production.INFO: count ==429  
[2025-03-18 01:51:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:51:06 - End Time 2025-03-18 01:51:06  
[2025-03-18 01:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704912', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704912', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:51:18] Production.INFO: ProcessCDR(1,14704912,1,1,2)  
[2025-03-18 01:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:51:21] Production.INFO: ==9332== Releasing lock...  
[2025-03-18 01:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:51:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:52:05
    [end_date_ymd] => 2025-03-18 01:52:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:52:05' and `end` < '2025-03-18 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-18 01:52:17] Production.INFO: count ==429  
[2025-03-18 01:52:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:52:05 - End Time 2025-03-18 01:52:05  
[2025-03-18 01:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704917', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704917', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704917', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704917', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:52:17] Production.INFO: ProcessCDR(1,14704917,1,1,2)  
[2025-03-18 01:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:52:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704917', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704917', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:52:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:52:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:52:20] Production.INFO: ==9405== Releasing lock...  
[2025-03-18 01:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:52:20] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:53:05
    [end_date_ymd] => 2025-03-18 01:53:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:53:05' and `end` < '2025-03-18 01: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-18 01:53:18] Production.INFO: count ==425  
[2025-03-18 01:53:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:53:05 - End Time 2025-03-18 01:53:05  
[2025-03-18 01:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704922', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704922', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704922', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704922', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:53:18] Production.INFO: ProcessCDR(1,14704922,1,1,2)  
[2025-03-18 01:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704922', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704922', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:53:21] Production.INFO: ==9478== Releasing lock...  
[2025-03-18 01:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:53:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:54:06
    [end_date_ymd] => 2025-03-18 01:54:06
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:54:06' and `end` < '2025-03-18 01: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-18 01:54:18] Production.INFO: count ==424  
[2025-03-18 01:54:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:54:06 - End Time 2025-03-18 01:54:06  
[2025-03-18 01:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704927', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704927', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704927', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704927', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:54:18] Production.INFO: ProcessCDR(1,14704927,1,1,2)  
[2025-03-18 01:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704927', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704927', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:54:21] Production.INFO: ==9550== Releasing lock...  
[2025-03-18 01:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:54:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:55:05
    [end_date_ymd] => 2025-03-18 01:55:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:55:05' and `end` < '2025-03-18 01: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-18 01:55:17] Production.INFO: count ==428  
[2025-03-18 01:55:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:55:05 - End Time 2025-03-18 01:55:05  
[2025-03-18 01:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704932', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704932', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704932', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704932', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:55:17] Production.INFO: ProcessCDR(1,14704932,1,1,2)  
[2025-03-18 01:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704932', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704932', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:55:21] Production.INFO: ==9622== Releasing lock...  
[2025-03-18 01:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:55:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:56:06
    [end_date_ymd] => 2025-03-18 01:56:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 22:56:06' and `end` < '2025-03-18 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-18 01:56:18] Production.INFO: count ==432  
[2025-03-18 01:56:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:56:06 - End Time 2025-03-18 01:56:06  
[2025-03-18 01:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704937', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704937', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704937', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704937', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:56:18] Production.INFO: ProcessCDR(1,14704937,1,1,2)  
[2025-03-18 01:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:56:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:56:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:56:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704937', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704937', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:56:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:56:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:56:23] Production.INFO: ==9702== Releasing lock...  
[2025-03-18 01:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:56:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 01:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:57:05
    [end_date_ymd] => 2025-03-18 01:57:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:57:05' and `end` < '2025-03-18 01: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-18 01:57:17] Production.INFO: count ==436  
[2025-03-18 01:57:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:57:05 - End Time 2025-03-18 01:57:05  
[2025-03-18 01:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704942', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704942', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704942', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704942', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:57:18] Production.INFO: ProcessCDR(1,14704942,1,1,2)  
[2025-03-18 01:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704942', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704942', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:57:21] Production.INFO: ==9779== Releasing lock...  
[2025-03-18 01:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:57:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 01:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:58:06
    [end_date_ymd] => 2025-03-18 01:58:06
    [RateCDR] => 1
)
  
[2025-03-18 01:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 22:58:06' and `end` < '2025-03-18 01:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 01:58:18] Production.INFO: count ==440  
[2025-03-18 01:58:18] Production.ERROR: pbx CDR StartTime 2025-03-17 22:58:06 - End Time 2025-03-18 01:58:06  
[2025-03-18 01:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704947', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704947', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704947', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704947', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:58:18] Production.INFO: ProcessCDR(1,14704947,1,1,2)  
[2025-03-18 01:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:58:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704947', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704947', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:58:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:58:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:58:23] Production.INFO: ==9853== Releasing lock...  
[2025-03-18 01:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:58:23] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 01:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 22:59:05
    [end_date_ymd] => 2025-03-18 01:59:05
    [RateCDR] => 1
)
  
[2025-03-18 01: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-17 22:59:05' and `end` < '2025-03-18 01: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-18 01:59:17] Production.INFO: count ==440  
[2025-03-18 01:59:17] Production.ERROR: pbx CDR StartTime 2025-03-17 22:59:05 - End Time 2025-03-18 01:59:05  
[2025-03-18 01:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 01:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704952', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704952', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704952', 'tblTempVendorCDR_20' ) start  
[2025-03-18 01:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704952', 'tblTempVendorCDR_20' ) end  
[2025-03-18 01:59:17] Production.INFO: ProcessCDR(1,14704952,1,1,2)  
[2025-03-18 01:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 01:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 01:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704952', 'tblTempUsageDetail_20' ) start  
[2025-03-18 01:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704952', 'tblTempUsageDetail_20' ) end  
[2025-03-18 01:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 01:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 01:59:21] Production.INFO: ==9925== Releasing lock...  
[2025-03-18 01:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 01:59:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:00:06
    [end_date_ymd] => 2025-03-18 02:00:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:00:06' and `end` < '2025-03-18 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-18 02:00:19] Production.INFO: count ==446  
[2025-03-18 02:00:19] Production.ERROR: pbx CDR StartTime 2025-03-17 23:00:06 - End Time 2025-03-18 02:00:06  
[2025-03-18 02:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704958', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704958', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:00:19] Production.INFO: ProcessCDR(1,14704958,1,1,2)  
[2025-03-18 02:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:00:22] Production.INFO: ==10000== Releasing lock...  
[2025-03-18 02:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:00:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:01:06
    [end_date_ymd] => 2025-03-18 02:01:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:01:06' and `end` < '2025-03-18 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-18 02:01:18] Production.INFO: count ==440  
[2025-03-18 02:01:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:01:06 - End Time 2025-03-18 02:01:06  
[2025-03-18 02:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704963', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704963', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:01:18] Production.INFO: ProcessCDR(1,14704963,1,1,2)  
[2025-03-18 02:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:01:22] Production.INFO: ==10088== Releasing lock...  
[2025-03-18 02:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:01:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:02:06
    [end_date_ymd] => 2025-03-18 02:02:06
    [RateCDR] => 1
)
  
[2025-03-18 02:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:02:06' and `end` < '2025-03-18 02:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:02:18] Production.INFO: count ==429  
[2025-03-18 02:02:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:02:06 - End Time 2025-03-18 02:02:06  
[2025-03-18 02:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704968', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704968', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704968', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704968', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:02:18] Production.INFO: ProcessCDR(1,14704968,1,1,2)  
[2025-03-18 02:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:02:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704968', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704968', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:02:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:02:22] Production.INFO: ==10284== Releasing lock...  
[2025-03-18 02:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:02:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:03:05
    [end_date_ymd] => 2025-03-18 02:03:05
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:03:05' and `end` < '2025-03-18 02: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-18 02:03:17] Production.INFO: count ==429  
[2025-03-18 02:03:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:03:05 - End Time 2025-03-18 02:03:05  
[2025-03-18 02:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704973', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704973', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704973', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704973', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:03:17] Production.INFO: ProcessCDR(1,14704973,1,1,2)  
[2025-03-18 02:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704973', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704973', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:03:21] Production.INFO: ==10360== Releasing lock...  
[2025-03-18 02:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:03:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:04:05
    [end_date_ymd] => 2025-03-18 02:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:04:05' and `end` < '2025-03-18 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-18 02:04:18] Production.INFO: count ==428  
[2025-03-18 02:04:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:04:05 - End Time 2025-03-18 02:04:05  
[2025-03-18 02:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704978', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704978', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704978', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704978', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:04:18] Production.INFO: ProcessCDR(1,14704978,1,1,2)  
[2025-03-18 02:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704978', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704978', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:04:22] Production.INFO: ==10433== Releasing lock...  
[2025-03-18 02:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:04:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:05:05
    [end_date_ymd] => 2025-03-18 02:05:05
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:05:05' and `end` < '2025-03-18 02: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-18 02:05:17] Production.INFO: count ==427  
[2025-03-18 02:05:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:05:05 - End Time 2025-03-18 02:05:05  
[2025-03-18 02:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704983', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704983', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704983', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704983', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:05:17] Production.INFO: ProcessCDR(1,14704983,1,1,2)  
[2025-03-18 02:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704983', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704983', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:05:21] Production.INFO: ==10506== Releasing lock...  
[2025-03-18 02:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:05:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:06:05
    [end_date_ymd] => 2025-03-18 02:06:05
    [RateCDR] => 1
)
  
[2025-03-18 02:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:06:05' and `end` < '2025-03-18 02:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:06:17] Production.INFO: count ==426  
[2025-03-18 02:06:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:06:05 - End Time 2025-03-18 02:06:05  
[2025-03-18 02:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704988', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704988', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704988', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704988', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:06:17] Production.INFO: ProcessCDR(1,14704988,1,1,2)  
[2025-03-18 02:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704988', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704988', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:06:21] Production.INFO: ==10576== Releasing lock...  
[2025-03-18 02:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:06:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:07:05
    [end_date_ymd] => 2025-03-18 02:07:05
    [RateCDR] => 1
)
  
[2025-03-18 02:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:07:05' and `end` < '2025-03-18 02:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:07:17] Production.INFO: count ==426  
[2025-03-18 02:07:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:07:05 - End Time 2025-03-18 02:07:05  
[2025-03-18 02:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704993', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704993', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704993', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704993', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:07:17] Production.INFO: ProcessCDR(1,14704993,1,1,2)  
[2025-03-18 02:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704993,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704993,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704993', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704993', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:07:21] Production.INFO: ==10648== Releasing lock...  
[2025-03-18 02:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:07:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:08:06
    [end_date_ymd] => 2025-03-18 02:08:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:08:06' and `end` < '2025-03-18 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-18 02:08:18] Production.INFO: count ==424  
[2025-03-18 02:08:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:08:06 - End Time 2025-03-18 02:08:06  
[2025-03-18 02:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704998', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14704998', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704998', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14704998', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:08:18] Production.INFO: ProcessCDR(1,14704998,1,1,2)  
[2025-03-18 02:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14704998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14704998,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14704998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14704998,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704998', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14704998', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:08:21] Production.INFO: ==10722== Releasing lock...  
[2025-03-18 02:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:08:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:09:05
    [end_date_ymd] => 2025-03-18 02:09:05
    [RateCDR] => 1
)
  
[2025-03-18 02:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:09:05' and `end` < '2025-03-18 02:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:09:17] Production.INFO: count ==424  
[2025-03-18 02:09:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:09:05 - End Time 2025-03-18 02:09:05  
[2025-03-18 02:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705003', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705003', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705003', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705003', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:09:17] Production.INFO: ProcessCDR(1,14705003,1,1,2)  
[2025-03-18 02:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705003,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705003,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705003', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705003', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:09:21] Production.INFO: ==10797== Releasing lock...  
[2025-03-18 02:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:09:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:10:06
    [end_date_ymd] => 2025-03-18 02:10:06
    [RateCDR] => 1
)
  
[2025-03-18 02:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:10:06' and `end` < '2025-03-18 02:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:10:18] Production.INFO: count ==427  
[2025-03-18 02:10:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:10:06 - End Time 2025-03-18 02:10:06  
[2025-03-18 02:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705008', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705008', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705008', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705008', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:10:18] Production.INFO: ProcessCDR(1,14705008,1,1,2)  
[2025-03-18 02:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705008,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705008,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705008', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705008', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:10:22] Production.INFO: ==10876== Releasing lock...  
[2025-03-18 02:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:10:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:11:05
    [end_date_ymd] => 2025-03-18 02:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:11:05' and `end` < '2025-03-18 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-18 02:11:17] Production.INFO: count ==424  
[2025-03-18 02:11:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:11:05 - End Time 2025-03-18 02:11:05  
[2025-03-18 02:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705014', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705014', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705014', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705014', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:11:17] Production.INFO: ProcessCDR(1,14705014,1,1,2)  
[2025-03-18 02:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705014,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705014,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705014,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705014,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705014', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705014', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:11:20] Production.INFO: ==10948== Releasing lock...  
[2025-03-18 02:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:11:20] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:12:05
    [end_date_ymd] => 2025-03-18 02:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:12:05' and `end` < '2025-03-18 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-18 02:12:18] Production.INFO: count ==422  
[2025-03-18 02:12:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:12:05 - End Time 2025-03-18 02:12:05  
[2025-03-18 02:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705019', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705019', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705019', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705019', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:12:18] Production.INFO: ProcessCDR(1,14705019,1,1,2)  
[2025-03-18 02:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705019', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705019', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:12:21] Production.INFO: ==11021== Releasing lock...  
[2025-03-18 02:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:12:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 02:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:13:05
    [end_date_ymd] => 2025-03-18 02:13:05
    [RateCDR] => 1
)
  
[2025-03-18 02:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:13:05' and `end` < '2025-03-18 02:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:13:18] Production.INFO: count ==422  
[2025-03-18 02:13:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:13:05 - End Time 2025-03-18 02:13:05  
[2025-03-18 02:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705024', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705024', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705024', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705024', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:13:18] Production.INFO: ProcessCDR(1,14705024,1,1,2)  
[2025-03-18 02:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705024', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705024', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:13:21] Production.INFO: ==11094== Releasing lock...  
[2025-03-18 02:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:13:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 02:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:14:05
    [end_date_ymd] => 2025-03-18 02:14:05
    [RateCDR] => 1
)
  
[2025-03-18 02:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:14:05' and `end` < '2025-03-18 02:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:14:17] Production.INFO: count ==422  
[2025-03-18 02:14:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:14:05 - End Time 2025-03-18 02:14:05  
[2025-03-18 02:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705029', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705029', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705029', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705029', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:14:17] Production.INFO: ProcessCDR(1,14705029,1,1,2)  
[2025-03-18 02:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705029', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705029', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:14:21] Production.INFO: ==11168== Releasing lock...  
[2025-03-18 02:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:14:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 02:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:15:05
    [end_date_ymd] => 2025-03-18 02:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:15:05' and `end` < '2025-03-18 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-18 02:15:17] Production.INFO: count ==422  
[2025-03-18 02:15:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:15:05 - End Time 2025-03-18 02:15:05  
[2025-03-18 02:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705034', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705034', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705034', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705034', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:15:17] Production.INFO: ProcessCDR(1,14705034,1,1,2)  
[2025-03-18 02:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705034', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705034', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:15:21] Production.INFO: ==11239== Releasing lock...  
[2025-03-18 02:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:15:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 02:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:16:06
    [end_date_ymd] => 2025-03-18 02:16:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:16:06' and `end` < '2025-03-18 02: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-18 02:16:18] Production.INFO: count ==421  
[2025-03-18 02:16:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:16:06 - End Time 2025-03-18 02:16:06  
[2025-03-18 02:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705039', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705039', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705039', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705039', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:16:18] Production.INFO: ProcessCDR(1,14705039,1,1,2)  
[2025-03-18 02:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705039', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705039', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:16:21] Production.INFO: ==11318== Releasing lock...  
[2025-03-18 02:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:16:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 02:17:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:17:04
    [end_date_ymd] => 2025-03-18 02:17:04
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:17:04' and `end` < '2025-03-18 02: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-18 02:17:17] Production.INFO: count ==423  
[2025-03-18 02:17:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:17:04 - End Time 2025-03-18 02:17:04  
[2025-03-18 02:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705044', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705044', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705044', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705044', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:17:17] Production.INFO: ProcessCDR(1,14705044,1,1,2)  
[2025-03-18 02:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705044,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:17:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705044,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705044', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705044', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:17:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:17:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:17:20] Production.INFO: ==11391== Releasing lock...  
[2025-03-18 02:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:17:20] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 02:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:18:05
    [end_date_ymd] => 2025-03-18 02:18:05
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:18:05' and `end` < '2025-03-18 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-18 02:18:18] Production.INFO: count ==431  
[2025-03-18 02:18:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:18:05 - End Time 2025-03-18 02:18:05  
[2025-03-18 02:18:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705049', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705049', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705049', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705049', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:18:18] Production.INFO: ProcessCDR(1,14705049,1,1,2)  
[2025-03-18 02:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705049,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705049,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705049', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705049', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:18:21] Production.INFO: ==11503== Releasing lock...  
[2025-03-18 02:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:18:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:19:05
    [end_date_ymd] => 2025-03-18 02:19:05
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:19:05' and `end` < '2025-03-18 02: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-18 02:19:17] Production.INFO: count ==431  
[2025-03-18 02:19:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:19:05 - End Time 2025-03-18 02:19:05  
[2025-03-18 02:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705054', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705054', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705054', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705054', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:19:17] Production.INFO: ProcessCDR(1,14705054,1,1,2)  
[2025-03-18 02:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705054,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705054,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705054', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705054', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:19:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:19:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:19:20] Production.INFO: ==11577== Releasing lock...  
[2025-03-18 02:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:19:20] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:20:06
    [end_date_ymd] => 2025-03-18 02:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:20:06' and `end` < '2025-03-18 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-18 02:20:18] Production.INFO: count ==431  
[2025-03-18 02:20:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:20:06 - End Time 2025-03-18 02:20:06  
[2025-03-18 02:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705059', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705059', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705059', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705059', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:20:18] Production.INFO: ProcessCDR(1,14705059,1,1,2)  
[2025-03-18 02:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705059,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705059,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705059', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705059', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:20:22] Production.INFO: ==11649== Releasing lock...  
[2025-03-18 02:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:20:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:21:05
    [end_date_ymd] => 2025-03-18 02:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:21:05' and `end` < '2025-03-18 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-18 02:21:17] Production.INFO: count ==428  
[2025-03-18 02:21:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:21:05 - End Time 2025-03-18 02:21:05  
[2025-03-18 02:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705065', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705065', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705065', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705065', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:21:17] Production.INFO: ProcessCDR(1,14705065,1,1,2)  
[2025-03-18 02:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:21:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705065', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:21:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705065', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:21:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:21:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:21:20] Production.INFO: ==11724== Releasing lock...  
[2025-03-18 02:21:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:21:20] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:22:05
    [end_date_ymd] => 2025-03-18 02:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:22:05' and `end` < '2025-03-18 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-18 02:22:17] Production.INFO: count ==431  
[2025-03-18 02:22:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:22:05 - End Time 2025-03-18 02:22:05  
[2025-03-18 02:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705070', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705070', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705070', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705070', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:22:17] Production.INFO: ProcessCDR(1,14705070,1,1,2)  
[2025-03-18 02:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705070', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705070', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:22:21] Production.INFO: ==11799== Releasing lock...  
[2025-03-18 02:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:22:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:23:05
    [end_date_ymd] => 2025-03-18 02:23:05
    [RateCDR] => 1
)
  
[2025-03-18 02:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:23:05' and `end` < '2025-03-18 02:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:23:17] Production.INFO: count ==429  
[2025-03-18 02:23:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:23:05 - End Time 2025-03-18 02:23:05  
[2025-03-18 02:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705075', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705075', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705075', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705075', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:23:17] Production.INFO: ProcessCDR(1,14705075,1,1,2)  
[2025-03-18 02:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705075', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705075', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:23:21] Production.INFO: ==11875== Releasing lock...  
[2025-03-18 02:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:23:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 02:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:24:05
    [end_date_ymd] => 2025-03-18 02:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:24:05' and `end` < '2025-03-18 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-18 02:24:17] Production.INFO: count ==432  
[2025-03-18 02:24:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:24:05 - End Time 2025-03-18 02:24:05  
[2025-03-18 02:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705080', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705080', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705080', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705080', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:24:17] Production.INFO: ProcessCDR(1,14705080,1,1,2)  
[2025-03-18 02:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705080', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705080', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:24:21] Production.INFO: ==11947== Releasing lock...  
[2025-03-18 02:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:24:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:25:05
    [end_date_ymd] => 2025-03-18 02:25:05
    [RateCDR] => 1
)
  
[2025-03-18 02:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:25:05' and `end` < '2025-03-18 02:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:25:17] Production.INFO: count ==438  
[2025-03-18 02:25:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:25:05 - End Time 2025-03-18 02:25:05  
[2025-03-18 02:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705085', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705085', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705085', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705085', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:25:17] Production.INFO: ProcessCDR(1,14705085,1,1,2)  
[2025-03-18 02:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705085', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705085', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:25:21] Production.INFO: ==12020== Releasing lock...  
[2025-03-18 02:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:25:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:26:05
    [end_date_ymd] => 2025-03-18 02:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:26:05' and `end` < '2025-03-18 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-18 02:26:17] Production.INFO: count ==437  
[2025-03-18 02:26:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:26:05 - End Time 2025-03-18 02:26:05  
[2025-03-18 02:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705090', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705090', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705090', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705090', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:26:17] Production.INFO: ProcessCDR(1,14705090,1,1,2)  
[2025-03-18 02:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705090', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705090', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:26:21] Production.INFO: ==12092== Releasing lock...  
[2025-03-18 02:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:26:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:27:05
    [end_date_ymd] => 2025-03-18 02:27:05
    [RateCDR] => 1
)
  
[2025-03-18 02:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:27:05' and `end` < '2025-03-18 02:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:27:17] Production.INFO: count ==450  
[2025-03-18 02:27:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:27:05 - End Time 2025-03-18 02:27:05  
[2025-03-18 02:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705095', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705095', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705095', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705095', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:27:17] Production.INFO: ProcessCDR(1,14705095,1,1,2)  
[2025-03-18 02:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705095,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705095,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705095', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705095', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:27:20] Production.INFO: ==12163== Releasing lock...  
[2025-03-18 02:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:27:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 02:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:28:05
    [end_date_ymd] => 2025-03-18 02:28:05
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:28:05' and `end` < '2025-03-18 02: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-18 02:28:17] Production.INFO: count ==445  
[2025-03-18 02:28:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:28:05 - End Time 2025-03-18 02:28:05  
[2025-03-18 02:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705100', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705100', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705100', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705100', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:28:17] Production.INFO: ProcessCDR(1,14705100,1,1,2)  
[2025-03-18 02:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705100,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705100,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705100', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705100', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:28:21] Production.INFO: ==12236== Releasing lock...  
[2025-03-18 02:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:28:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:29:06
    [end_date_ymd] => 2025-03-18 02:29:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:29:06' and `end` < '2025-03-18 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-18 02:29:18] Production.INFO: count ==445  
[2025-03-18 02:29:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:29:06 - End Time 2025-03-18 02:29:06  
[2025-03-18 02:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705105', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705105', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705105', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705105', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:29:18] Production.INFO: ProcessCDR(1,14705105,1,1,2)  
[2025-03-18 02:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705105,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705105,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705105', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705105', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:29:21] Production.INFO: ==12307== Releasing lock...  
[2025-03-18 02:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:29:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:30:06
    [end_date_ymd] => 2025-03-18 02:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:30:06' and `end` < '2025-03-18 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-18 02:30:19] Production.INFO: count ==447  
[2025-03-18 02:30:19] Production.ERROR: pbx CDR StartTime 2025-03-17 23:30:06 - End Time 2025-03-18 02:30:06  
[2025-03-18 02:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705111', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705111', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705111', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705111', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:30:19] Production.INFO: ProcessCDR(1,14705111,1,1,2)  
[2025-03-18 02:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705111', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705111', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:30:22] Production.INFO: ==12384== Releasing lock...  
[2025-03-18 02:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:30:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:31:05
    [end_date_ymd] => 2025-03-18 02:31:05
    [RateCDR] => 1
)
  
[2025-03-18 02:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:31:05' and `end` < '2025-03-18 02:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:31:17] Production.INFO: count ==447  
[2025-03-18 02:31:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:31:05 - End Time 2025-03-18 02:31:05  
[2025-03-18 02:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705116', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705116', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705116', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705116', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:31:18] Production.INFO: ProcessCDR(1,14705116,1,1,2)  
[2025-03-18 02:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705116', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705116', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:31:21] Production.INFO: ==12463== Releasing lock...  
[2025-03-18 02:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:31:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:32:05
    [end_date_ymd] => 2025-03-18 02:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:32:05' and `end` < '2025-03-18 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-18 02:32:17] Production.INFO: count ==450  
[2025-03-18 02:32:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:32:05 - End Time 2025-03-18 02:32:05  
[2025-03-18 02:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705121', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705121', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705121', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705121', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:32:17] Production.INFO: ProcessCDR(1,14705121,1,1,2)  
[2025-03-18 02:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705121', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705121', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:32:21] Production.INFO: ==12536== Releasing lock...  
[2025-03-18 02:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:32:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:33:06
    [end_date_ymd] => 2025-03-18 02:33:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:33:06' and `end` < '2025-03-18 02: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-18 02:33:18] Production.INFO: count ==453  
[2025-03-18 02:33:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:33:06 - End Time 2025-03-18 02:33:06  
[2025-03-18 02:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705126', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705126', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705126', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705126', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:33:18] Production.INFO: ProcessCDR(1,14705126,1,1,2)  
[2025-03-18 02:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705126', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705126', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:33:21] Production.INFO: ==12646== Releasing lock...  
[2025-03-18 02:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:33:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:34:06
    [end_date_ymd] => 2025-03-18 02:34:06
    [RateCDR] => 1
)
  
[2025-03-18 02:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:34:06' and `end` < '2025-03-18 02:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:34:18] Production.INFO: count ==453  
[2025-03-18 02:34:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:34:06 - End Time 2025-03-18 02:34:06  
[2025-03-18 02:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705131', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705131', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705131', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705131', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:34:18] Production.INFO: ProcessCDR(1,14705131,1,1,2)  
[2025-03-18 02:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:34:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705131', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705131', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:34:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:34:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:34:22] Production.INFO: ==12719== Releasing lock...  
[2025-03-18 02:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:34:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:35:05
    [end_date_ymd] => 2025-03-18 02:35:05
    [RateCDR] => 1
)
  
[2025-03-18 02:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:35:05' and `end` < '2025-03-18 02:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:35:18] Production.INFO: count ==452  
[2025-03-18 02:35:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:35:05 - End Time 2025-03-18 02:35:05  
[2025-03-18 02:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705136', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705136', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705136', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705136', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:35:18] Production.INFO: ProcessCDR(1,14705136,1,1,2)  
[2025-03-18 02:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705136', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705136', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:35:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:35:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:35:22] Production.INFO: ==12800== Releasing lock...  
[2025-03-18 02:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:35:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 02:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:36:06
    [end_date_ymd] => 2025-03-18 02:36:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:36:06' and `end` < '2025-03-18 02: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-18 02:36:18] Production.INFO: count ==457  
[2025-03-18 02:36:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:36:06 - End Time 2025-03-18 02:36:06  
[2025-03-18 02:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705141', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705141', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705141', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705141', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:36:18] Production.INFO: ProcessCDR(1,14705141,1,1,2)  
[2025-03-18 02:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705141,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:36:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705141,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:36:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705141', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:36:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705141', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:36:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:36:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:36:22] Production.INFO: ==12872== Releasing lock...  
[2025-03-18 02:36:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:36:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:37:06
    [end_date_ymd] => 2025-03-18 02:37:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:37:06' and `end` < '2025-03-18 02: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-18 02:37:18] Production.INFO: count ==457  
[2025-03-18 02:37:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:37:06 - End Time 2025-03-18 02:37:06  
[2025-03-18 02:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705146', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705146', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705146', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705146', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:37:18] Production.INFO: ProcessCDR(1,14705146,1,1,2)  
[2025-03-18 02:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:37:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:37:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705146', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705146', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:37:22] Production.INFO: ==12951== Releasing lock...  
[2025-03-18 02:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:37:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:38:06
    [end_date_ymd] => 2025-03-18 02:38:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:38:06' and `end` < '2025-03-18 02: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-18 02:38:18] Production.INFO: count ==457  
[2025-03-18 02:38:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:38:06 - End Time 2025-03-18 02:38:06  
[2025-03-18 02:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705151', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705151', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705151', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705151', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:38:18] Production.INFO: ProcessCDR(1,14705151,1,1,2)  
[2025-03-18 02:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705151,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:38:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705151,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705151', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705151', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:38:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:38:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:38:22] Production.INFO: ==13021== Releasing lock...  
[2025-03-18 02:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:38:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:39:06
    [end_date_ymd] => 2025-03-18 02:39:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:39:06' and `end` < '2025-03-18 02: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-18 02:39:18] Production.INFO: count ==457  
[2025-03-18 02:39:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:39:06 - End Time 2025-03-18 02:39:06  
[2025-03-18 02:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705156', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705156', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705156', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705156', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:39:18] Production.INFO: ProcessCDR(1,14705156,1,1,2)  
[2025-03-18 02:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:39:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705156,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:39:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705156,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705156', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705156', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:39:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:39:22] Production.INFO: ==13095== Releasing lock...  
[2025-03-18 02:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:39:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:40:06
    [end_date_ymd] => 2025-03-18 02:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:40:06' and `end` < '2025-03-18 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-18 02:40:18] Production.INFO: count ==459  
[2025-03-18 02:40:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:40:06 - End Time 2025-03-18 02:40:06  
[2025-03-18 02:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705162', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705162', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705162', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705162', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:40:18] Production.INFO: ProcessCDR(1,14705162,1,1,2)  
[2025-03-18 02:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:40:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:40:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705162', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705162', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:40:22] Production.INFO: ==13174== Releasing lock...  
[2025-03-18 02:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:40:22] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 02:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:41:05
    [end_date_ymd] => 2025-03-18 02:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:41:05' and `end` < '2025-03-18 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-18 02:41:17] Production.INFO: count ==459  
[2025-03-18 02:41:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:41:05 - End Time 2025-03-18 02:41:05  
[2025-03-18 02:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705167', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705167', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705167', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705167', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:41:17] Production.INFO: ProcessCDR(1,14705167,1,1,2)  
[2025-03-18 02:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705167', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705167', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:41:21] Production.INFO: ==13266== Releasing lock...  
[2025-03-18 02:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:41:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 02:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:42:06
    [end_date_ymd] => 2025-03-18 02:42:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:42:06' and `end` < '2025-03-18 02: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-18 02:42:18] Production.INFO: count ==457  
[2025-03-18 02:42:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:42:06 - End Time 2025-03-18 02:42:06  
[2025-03-18 02:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705172', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705172', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705172', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705172', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:42:18] Production.INFO: ProcessCDR(1,14705172,1,1,2)  
[2025-03-18 02:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705172', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705172', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:42:22] Production.INFO: ==13345== Releasing lock...  
[2025-03-18 02:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:42:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:43:05
    [end_date_ymd] => 2025-03-18 02:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:43:05' and `end` < '2025-03-18 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-18 02:43:17] Production.INFO: count ==457  
[2025-03-18 02:43:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:43:05 - End Time 2025-03-18 02:43:05  
[2025-03-18 02:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705177', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705177', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705177', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705177', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:43:17] Production.INFO: ProcessCDR(1,14705177,1,1,2)  
[2025-03-18 02:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705177', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705177', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:43:21] Production.INFO: ==13433== Releasing lock...  
[2025-03-18 02:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:43:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:44:06
    [end_date_ymd] => 2025-03-18 02:44:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:44:06' and `end` < '2025-03-18 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-18 02:44:18] Production.INFO: count ==433  
[2025-03-18 02:44:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:44:06 - End Time 2025-03-18 02:44:06  
[2025-03-18 02:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705182', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705182', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705182', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705182', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:44:18] Production.INFO: ProcessCDR(1,14705182,1,1,2)  
[2025-03-18 02:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:44:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:44:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:44:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705182', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705182', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:44:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:44:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:44:22] Production.INFO: ==13519== Releasing lock...  
[2025-03-18 02:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:44:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:45:05
    [end_date_ymd] => 2025-03-18 02:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:45:05' and `end` < '2025-03-18 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-18 02:45:18] Production.INFO: count ==438  
[2025-03-18 02:45:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:45:05 - End Time 2025-03-18 02:45:05  
[2025-03-18 02:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705187', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705187', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705187', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705187', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:45:18] Production.INFO: ProcessCDR(1,14705187,1,1,2)  
[2025-03-18 02:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:45:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705187', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705187', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:45:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:45:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:45:22] Production.INFO: ==13607== Releasing lock...  
[2025-03-18 02:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:45:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 02:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:46:05
    [end_date_ymd] => 2025-03-18 02:46:05
    [RateCDR] => 1
)
  
[2025-03-18 02:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:46:05' and `end` < '2025-03-18 02:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:46:18] Production.INFO: count ==444  
[2025-03-18 02:46:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:46:05 - End Time 2025-03-18 02:46:05  
[2025-03-18 02:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705192', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705192', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705192', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705192', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:46:18] Production.INFO: ProcessCDR(1,14705192,1,1,2)  
[2025-03-18 02:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705192,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705192,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705192,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705192,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705192', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705192', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:46:21] Production.INFO: ==13693== Releasing lock...  
[2025-03-18 02:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:46:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:47:05
    [end_date_ymd] => 2025-03-18 02:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:47:05' and `end` < '2025-03-18 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-18 02:47:17] Production.INFO: count ==457  
[2025-03-18 02:47:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:47:05 - End Time 2025-03-18 02:47:05  
[2025-03-18 02:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705197', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705197', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705197', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705197', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:47:17] Production.INFO: ProcessCDR(1,14705197,1,1,2)  
[2025-03-18 02:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705197,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705197,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705197', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705197', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:47:21] Production.INFO: ==13782== Releasing lock...  
[2025-03-18 02:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:47:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:48:06
    [end_date_ymd] => 2025-03-18 02:48:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:48:06' and `end` < '2025-03-18 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-18 02:48:18] Production.INFO: count ==455  
[2025-03-18 02:48:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:48:06 - End Time 2025-03-18 02:48:06  
[2025-03-18 02:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705202', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705202', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705202', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705202', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:48:18] Production.INFO: ProcessCDR(1,14705202,1,1,2)  
[2025-03-18 02:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705202,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:48:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705202,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705202', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705202', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:48:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:48:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:48:22] Production.INFO: ==13867== Releasing lock...  
[2025-03-18 02:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:48:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:49:05
    [end_date_ymd] => 2025-03-18 02:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:49:05' and `end` < '2025-03-18 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-18 02:49:17] Production.INFO: count ==456  
[2025-03-18 02:49:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:49:05 - End Time 2025-03-18 02:49:05  
[2025-03-18 02:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705207', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705207', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705207', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705207', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:49:18] Production.INFO: ProcessCDR(1,14705207,1,1,2)  
[2025-03-18 02:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705207,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705207,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705207', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705207', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:49:21] Production.INFO: ==13998== Releasing lock...  
[2025-03-18 02:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:49:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:50:06
    [end_date_ymd] => 2025-03-18 02:50:06
    [RateCDR] => 1
)
  
[2025-03-18 02:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:50:06' and `end` < '2025-03-18 02:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:50:19] Production.INFO: count ==456  
[2025-03-18 02:50:19] Production.ERROR: pbx CDR StartTime 2025-03-17 23:50:06 - End Time 2025-03-18 02:50:06  
[2025-03-18 02:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705212', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705212', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705212', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705212', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:50:19] Production.INFO: ProcessCDR(1,14705212,1,1,2)  
[2025-03-18 02:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705212,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705212,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705212', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705212', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:50:22] Production.INFO: ==14091== Releasing lock...  
[2025-03-18 02:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:50:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:51:06
    [end_date_ymd] => 2025-03-18 02:51:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:51:06' and `end` < '2025-03-18 02: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-18 02:51:18] Production.INFO: count ==456  
[2025-03-18 02:51:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:51:06 - End Time 2025-03-18 02:51:06  
[2025-03-18 02:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705218', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705218', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705218', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705218', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:51:18] Production.INFO: ProcessCDR(1,14705218,1,1,2)  
[2025-03-18 02:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:51:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705218', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705218', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:51:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:51:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:51:22] Production.INFO: ==14180== Releasing lock...  
[2025-03-18 02:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:51:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:52:06
    [end_date_ymd] => 2025-03-18 02:52:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:52:06' and `end` < '2025-03-18 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-18 02:52:18] Production.INFO: count ==456  
[2025-03-18 02:52:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:52:06 - End Time 2025-03-18 02:52:06  
[2025-03-18 02:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705223', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705223', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705223', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705223', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:52:19] Production.INFO: ProcessCDR(1,14705223,1,1,2)  
[2025-03-18 02:52:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:52:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:52:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705223', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705223', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:52:22] Production.INFO: ==14271== Releasing lock...  
[2025-03-18 02:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:52:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:53:05
    [end_date_ymd] => 2025-03-18 02:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:53:05' and `end` < '2025-03-18 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-18 02:53:17] Production.INFO: count ==456  
[2025-03-18 02:53:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:53:05 - End Time 2025-03-18 02:53:05  
[2025-03-18 02:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705228', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705228', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705228', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705228', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:53:17] Production.INFO: ProcessCDR(1,14705228,1,1,2)  
[2025-03-18 02:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705228', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705228', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:53:21] Production.INFO: ==14358== Releasing lock...  
[2025-03-18 02:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:53:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:54:06
    [end_date_ymd] => 2025-03-18 02:54:06
    [RateCDR] => 1
)
  
[2025-03-18 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-17 23:54:06' and `end` < '2025-03-18 02: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-18 02:54:18] Production.INFO: count ==456  
[2025-03-18 02:54:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:54:06 - End Time 2025-03-18 02:54:06  
[2025-03-18 02:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705233', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705233', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705233', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705233', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:54:19] Production.INFO: ProcessCDR(1,14705233,1,1,2)  
[2025-03-18 02:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:54:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:54:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705233', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705233', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:54:22] Production.INFO: ==14445== Releasing lock...  
[2025-03-18 02:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:54:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:55:05
    [end_date_ymd] => 2025-03-18 02:55:05
    [RateCDR] => 1
)
  
[2025-03-18 02:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:55:05' and `end` < '2025-03-18 02:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:55:17] Production.INFO: count ==459  
[2025-03-18 02:55:17] Production.ERROR: pbx CDR StartTime 2025-03-17 23:55:05 - End Time 2025-03-18 02:55:05  
[2025-03-18 02:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705238', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705238', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705238', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705238', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:55:17] Production.INFO: ProcessCDR(1,14705238,1,1,2)  
[2025-03-18 02:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705238', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705238', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:55:21] Production.INFO: ==14535== Releasing lock...  
[2025-03-18 02:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:55:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 02:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:56:06
    [end_date_ymd] => 2025-03-18 02:56:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:56:06' and `end` < '2025-03-18 02: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-18 02:56:18] Production.INFO: count ==457  
[2025-03-18 02:56:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:56:06 - End Time 2025-03-18 02:56:06  
[2025-03-18 02:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705243', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705243', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705243', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705243', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:56:18] Production.INFO: ProcessCDR(1,14705243,1,1,2)  
[2025-03-18 02:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705243,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705243,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705243,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:56:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705243,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705243', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705243', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:56:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:56:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:56:22] Production.INFO: ==14622== Releasing lock...  
[2025-03-18 02:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:56:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 02:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:57:06
    [end_date_ymd] => 2025-03-18 02:57:06
    [RateCDR] => 1
)
  
[2025-03-18 02:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:57:06' and `end` < '2025-03-18 02:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:57:18] Production.INFO: count ==460  
[2025-03-18 02:57:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:57:06 - End Time 2025-03-18 02:57:06  
[2025-03-18 02:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705248', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705248', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705248', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705248', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:57:18] Production.INFO: ProcessCDR(1,14705248,1,1,2)  
[2025-03-18 02:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705248,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:57:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705248,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705248', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705248', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:57:22] Production.INFO: ==14709== Releasing lock...  
[2025-03-18 02:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:57:22] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 02:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:58:06
    [end_date_ymd] => 2025-03-18 02:58:06
    [RateCDR] => 1
)
  
[2025-03-18 02: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-17 23:58:06' and `end` < '2025-03-18 02: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-18 02:58:18] Production.INFO: count ==455  
[2025-03-18 02:58:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:58:06 - End Time 2025-03-18 02:58:06  
[2025-03-18 02:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705253', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705253', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705253', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705253', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:58:18] Production.INFO: ProcessCDR(1,14705253,1,1,2)  
[2025-03-18 02:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705253,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705253,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705253', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705253', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:58:22] Production.INFO: ==14797== Releasing lock...  
[2025-03-18 02:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:58:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 02:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-17 23:59:05
    [end_date_ymd] => 2025-03-18 02:59:05
    [RateCDR] => 1
)
  
[2025-03-18 02:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-17 23:59:05' and `end` < '2025-03-18 02:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 02:59:17] Production.INFO: count ==456  
[2025-03-18 02:59:18] Production.ERROR: pbx CDR StartTime 2025-03-17 23:59:05 - End Time 2025-03-18 02:59:05  
[2025-03-18 02:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 02:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705258', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705258', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705258', 'tblTempVendorCDR_20' ) start  
[2025-03-18 02:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705258', 'tblTempVendorCDR_20' ) end  
[2025-03-18 02:59:18] Production.INFO: ProcessCDR(1,14705258,1,1,2)  
[2025-03-18 02:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705258,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 02:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705258,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 02:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705258', 'tblTempUsageDetail_20' ) start  
[2025-03-18 02:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705258', 'tblTempUsageDetail_20' ) end  
[2025-03-18 02:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 02:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 02:59:21] Production.INFO: ==14889== Releasing lock...  
[2025-03-18 02:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 02:59:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:00:07
    [end_date_ymd] => 2025-03-18 03:00:07
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:00:07' and `end` < '2025-03-18 03: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-18 03:00:19] Production.INFO: count ==451  
[2025-03-18 03:00:20] Production.ERROR: pbx CDR StartTime 2025-03-18 00:00:07 - End Time 2025-03-18 03:00:07  
[2025-03-18 03:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705263', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705263', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705263', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705263', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:00:20] Production.INFO: ProcessCDR(1,14705263,1,1,2)  
[2025-03-18 03:00:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705263,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:00:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705263,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705263', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705263', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:00:23] Production.INFO: ==14982== Releasing lock...  
[2025-03-18 03:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:00:23] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:01:05
    [end_date_ymd] => 2025-03-18 03:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:01:05' and `end` < '2025-03-18 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-18 03:01:17] Production.INFO: count ==452  
[2025-03-18 03:01:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:01:05 - End Time 2025-03-18 03:01:05  
[2025-03-18 03:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705269', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705269', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705269', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705269', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:01:18] Production.INFO: ProcessCDR(1,14705269,1,1,2)  
[2025-03-18 03:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705269', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705269', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:01:22] Production.INFO: ==15075== Releasing lock...  
[2025-03-18 03:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:01:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:02:06
    [end_date_ymd] => 2025-03-18 03:02:06
    [RateCDR] => 1
)
  
[2025-03-18 03:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:02:06' and `end` < '2025-03-18 03:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:02:18] Production.INFO: count ==451  
[2025-03-18 03:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:02:06 - End Time 2025-03-18 03:02:06  
[2025-03-18 03:02:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705274', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705274', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705274', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705274', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:02:19] Production.INFO: ProcessCDR(1,14705274,1,1,2)  
[2025-03-18 03:02:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:02:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:02:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:02:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705274', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705274', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:02:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:02:22] Production.INFO: ==15240== Releasing lock...  
[2025-03-18 03:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:02:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:03:06
    [end_date_ymd] => 2025-03-18 03:03:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:03:06' and `end` < '2025-03-18 03: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-18 03:03:18] Production.INFO: count ==453  
[2025-03-18 03:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:03:06 - End Time 2025-03-18 03:03:06  
[2025-03-18 03:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705279', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705279', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705279', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705279', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:03:18] Production.INFO: ProcessCDR(1,14705279,1,1,2)  
[2025-03-18 03:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705279', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705279', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:03:22] Production.INFO: ==15317== Releasing lock...  
[2025-03-18 03:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:03:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:04:05
    [end_date_ymd] => 2025-03-18 03:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:04:05' and `end` < '2025-03-18 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-18 03:04:17] Production.INFO: count ==453  
[2025-03-18 03:04:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:04:05 - End Time 2025-03-18 03:04:05  
[2025-03-18 03:04:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705284', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705284', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705284', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:04:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705284', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:04:17] Production.INFO: ProcessCDR(1,14705284,1,1,2)  
[2025-03-18 03:04:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:04:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:04:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705284', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705284', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:04:21] Production.INFO: ==15443== Releasing lock...  
[2025-03-18 03:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:04:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:05:05
    [end_date_ymd] => 2025-03-18 03:05:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:05:05' and `end` < '2025-03-18 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-18 03:05:18] Production.INFO: count ==450  
[2025-03-18 03:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:05:05 - End Time 2025-03-18 03:05:05  
[2025-03-18 03:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705289', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705289', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705289', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705289', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:05:18] Production.INFO: ProcessCDR(1,14705289,1,1,2)  
[2025-03-18 03:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705289', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705289', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:05:22] Production.INFO: ==15523== Releasing lock...  
[2025-03-18 03:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:05:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:06:06
    [end_date_ymd] => 2025-03-18 03:06:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:06:06' and `end` < '2025-03-18 03: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-18 03:06:18] Production.INFO: count ==446  
[2025-03-18 03:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:06:06 - End Time 2025-03-18 03:06:06  
[2025-03-18 03:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705294', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705294', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705294', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705294', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:06:18] Production.INFO: ProcessCDR(1,14705294,1,1,2)  
[2025-03-18 03:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:06:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705294,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:06:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705294,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705294', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705294', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:06:22] Production.INFO: ==15725== Releasing lock...  
[2025-03-18 03:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:06:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:07:06
    [end_date_ymd] => 2025-03-18 03:07:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:07:06' and `end` < '2025-03-18 03: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-18 03:07:18] Production.INFO: count ==437  
[2025-03-18 03:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:07:06 - End Time 2025-03-18 03:07:06  
[2025-03-18 03:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705299', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705299', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705299', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705299', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:07:18] Production.INFO: ProcessCDR(1,14705299,1,1,2)  
[2025-03-18 03:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705299,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705299,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705299', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705299', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:07:22] Production.INFO: ==15813== Releasing lock...  
[2025-03-18 03:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:07:22] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:08:06
    [end_date_ymd] => 2025-03-18 03:08:06
    [RateCDR] => 1
)
  
[2025-03-18 03:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:08:06' and `end` < '2025-03-18 03:08:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:08:18] Production.INFO: count ==435  
[2025-03-18 03:08:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:08:06 - End Time 2025-03-18 03:08:06  
[2025-03-18 03:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705304', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705304', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705304', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705304', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:08:18] Production.INFO: ProcessCDR(1,14705304,1,1,2)  
[2025-03-18 03:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705304,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:08:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705304,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705304', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705304', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:08:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:08:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:08:22] Production.INFO: ==15895== Releasing lock...  
[2025-03-18 03:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:08:22] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:09:05
    [end_date_ymd] => 2025-03-18 03:09:05
    [RateCDR] => 1
)
  
[2025-03-18 03:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:09:05' and `end` < '2025-03-18 03:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:09:17] Production.INFO: count ==435  
[2025-03-18 03:09:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:09:05 - End Time 2025-03-18 03:09:05  
[2025-03-18 03:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705309', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705309', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705309', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705309', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:09:17] Production.INFO: ProcessCDR(1,14705309,1,1,2)  
[2025-03-18 03:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705309,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705309,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705309', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705309', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:09:21] Production.INFO: ==16058== Releasing lock...  
[2025-03-18 03:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:09:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 03:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:10:07
    [end_date_ymd] => 2025-03-18 03:10:07
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:10:07' and `end` < '2025-03-18 03: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-18 03:10:19] Production.INFO: count ==425  
[2025-03-18 03:10:19] Production.ERROR: pbx CDR StartTime 2025-03-18 00:10:07 - End Time 2025-03-18 03:10:07  
[2025-03-18 03:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705314', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705314', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705314', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705314', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:10:19] Production.INFO: ProcessCDR(1,14705314,1,1,2)  
[2025-03-18 03:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:10:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705314,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:10:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:10:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705314,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705314', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705314', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:10:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:10:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:10:23] Production.INFO: ==16143== Releasing lock...  
[2025-03-18 03:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:10:23] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:11:05
    [end_date_ymd] => 2025-03-18 03:11:05
    [RateCDR] => 1
)
  
[2025-03-18 03:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:11:05' and `end` < '2025-03-18 03:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:11:18] Production.INFO: count ==417  
[2025-03-18 03:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:11:05 - End Time 2025-03-18 03:11:05  
[2025-03-18 03:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705320', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705320', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705320', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705320', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:11:18] Production.INFO: ProcessCDR(1,14705320,1,1,2)  
[2025-03-18 03:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705320', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705320', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:11:21] Production.INFO: ==16234== Releasing lock...  
[2025-03-18 03:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:11:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 03:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:12:06
    [end_date_ymd] => 2025-03-18 03:12:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:12:06' and `end` < '2025-03-18 03: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-18 03:12:18] Production.INFO: count ==417  
[2025-03-18 03:12:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:12:06 - End Time 2025-03-18 03:12:06  
[2025-03-18 03:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705325', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705325', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705325', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705325', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:12:18] Production.INFO: ProcessCDR(1,14705325,1,1,2)  
[2025-03-18 03:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:12:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705325', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705325', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:12:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:12:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:12:22] Production.INFO: ==16322== Releasing lock...  
[2025-03-18 03:12:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:12:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 03:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:13:05
    [end_date_ymd] => 2025-03-18 03:13:05
    [RateCDR] => 1
)
  
[2025-03-18 03:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:13:05' and `end` < '2025-03-18 03:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:13:17] Production.INFO: count ==417  
[2025-03-18 03:13:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:13:05 - End Time 2025-03-18 03:13:05  
[2025-03-18 03:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705330', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705330', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705330', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705330', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:13:17] Production.INFO: ProcessCDR(1,14705330,1,1,2)  
[2025-03-18 03:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705330', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705330', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:13:21] Production.INFO: ==16470== Releasing lock...  
[2025-03-18 03:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:13:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 03:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:14:06
    [end_date_ymd] => 2025-03-18 03:14:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:14:06' and `end` < '2025-03-18 03: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-18 03:14:18] Production.INFO: count ==416  
[2025-03-18 03:14:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:14:06 - End Time 2025-03-18 03:14:06  
[2025-03-18 03:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705335', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705335', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705335', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705335', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:14:18] Production.INFO: ProcessCDR(1,14705335,1,1,2)  
[2025-03-18 03:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705335', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705335', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:14:22] Production.INFO: ==16544== Releasing lock...  
[2025-03-18 03:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:14:22] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 03:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:15:05
    [end_date_ymd] => 2025-03-18 03:15:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:15:05' and `end` < '2025-03-18 03: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-18 03:15:17] Production.INFO: count ==415  
[2025-03-18 03:15:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:15:05 - End Time 2025-03-18 03:15:05  
[2025-03-18 03:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705340', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705340', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705340', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705340', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:15:17] Production.INFO: ProcessCDR(1,14705340,1,1,2)  
[2025-03-18 03:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:15:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705340', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:15:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705340', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:15:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:15:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:15:20] Production.INFO: ==16614== Releasing lock...  
[2025-03-18 03:15:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:15:20] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:16:06
    [end_date_ymd] => 2025-03-18 03:16:06
    [RateCDR] => 1
)
  
[2025-03-18 03:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:16:06' and `end` < '2025-03-18 03:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:16:18] Production.INFO: count ==415  
[2025-03-18 03:16:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:16:06 - End Time 2025-03-18 03:16:06  
[2025-03-18 03:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705345', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705345', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705345', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705345', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:16:18] Production.INFO: ProcessCDR(1,14705345,1,1,2)  
[2025-03-18 03:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705345', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705345', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:16:21] Production.INFO: ==16686== Releasing lock...  
[2025-03-18 03:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:16:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 03:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:17:05
    [end_date_ymd] => 2025-03-18 03:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:17:05' and `end` < '2025-03-18 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-18 03:17:18] Production.INFO: count ==414  
[2025-03-18 03:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:17:05 - End Time 2025-03-18 03:17:05  
[2025-03-18 03:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705350', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705350', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705350', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705350', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:17:18] Production.INFO: ProcessCDR(1,14705350,1,1,2)  
[2025-03-18 03:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705350,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705350,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705350', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705350', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:17:21] Production.INFO: ==16834== Releasing lock...  
[2025-03-18 03:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:17:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 03:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:18:05
    [end_date_ymd] => 2025-03-18 03:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:18:05' and `end` < '2025-03-18 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-18 03:18:17] Production.INFO: count ==410  
[2025-03-18 03:18:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:18:05 - End Time 2025-03-18 03:18:05  
[2025-03-18 03:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705355', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705355', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705355', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705355', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:18:18] Production.INFO: ProcessCDR(1,14705355,1,1,2)  
[2025-03-18 03:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705355,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705355,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705355', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705355', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:18:21] Production.INFO: ==16910== Releasing lock...  
[2025-03-18 03:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:18:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 03:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:19:05
    [end_date_ymd] => 2025-03-18 03:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:19:05' and `end` < '2025-03-18 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-18 03:19:18] Production.INFO: count ==407  
[2025-03-18 03:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:19:05 - End Time 2025-03-18 03:19:05  
[2025-03-18 03:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705360', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705360', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705360', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705360', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:19:18] Production.INFO: ProcessCDR(1,14705360,1,1,2)  
[2025-03-18 03:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705360,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705360,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705360', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705360', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:19:21] Production.INFO: ==16982== Releasing lock...  
[2025-03-18 03:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:19:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:20:06
    [end_date_ymd] => 2025-03-18 03:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:20:06' and `end` < '2025-03-18 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-18 03:20:18] Production.INFO: count ==407  
[2025-03-18 03:20:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:20:06 - End Time 2025-03-18 03:20:06  
[2025-03-18 03:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705366', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705366', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:20:18] Production.INFO: ProcessCDR(1,14705366,1,1,2)  
[2025-03-18 03:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:20:22] Production.INFO: ==17055== Releasing lock...  
[2025-03-18 03:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:20:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:21:05
    [end_date_ymd] => 2025-03-18 03:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:21:05' and `end` < '2025-03-18 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-18 03:21:17] Production.INFO: count ==397  
[2025-03-18 03:21:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:21:05 - End Time 2025-03-18 03:21:05  
[2025-03-18 03:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705371', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705371', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:21:17] Production.INFO: ProcessCDR(1,14705371,1,1,2)  
[2025-03-18 03:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:21:21] Production.INFO: ==17166== Releasing lock...  
[2025-03-18 03:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:21:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:22:05
    [end_date_ymd] => 2025-03-18 03:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:22:05' and `end` < '2025-03-18 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-18 03:22:17] Production.INFO: count ==397  
[2025-03-18 03:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:22:05 - End Time 2025-03-18 03:22:05  
[2025-03-18 03:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705376', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705376', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705376', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705376', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:22:18] Production.INFO: ProcessCDR(1,14705376,1,1,2)  
[2025-03-18 03:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705376', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705376', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:22:21] Production.INFO: ==17237== Releasing lock...  
[2025-03-18 03:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:22:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:23:05
    [end_date_ymd] => 2025-03-18 03:23:05
    [RateCDR] => 1
)
  
[2025-03-18 03:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:23:05' and `end` < '2025-03-18 03:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:23:17] Production.INFO: count ==397  
[2025-03-18 03:23:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:23:05 - End Time 2025-03-18 03:23:05  
[2025-03-18 03:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705381', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705381', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705381', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705381', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:23:17] Production.INFO: ProcessCDR(1,14705381,1,1,2)  
[2025-03-18 03:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705381', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705381', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:23:21] Production.INFO: ==17307== Releasing lock...  
[2025-03-18 03:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:23:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:24:06
    [end_date_ymd] => 2025-03-18 03:24:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:24:06' and `end` < '2025-03-18 03: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-18 03:24:18] Production.INFO: count ==397  
[2025-03-18 03:24:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:24:06 - End Time 2025-03-18 03:24:06  
[2025-03-18 03:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705386', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705386', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705386', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705386', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:24:18] Production.INFO: ProcessCDR(1,14705386,1,1,2)  
[2025-03-18 03:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705386', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705386', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:24:21] Production.INFO: ==17401== Releasing lock...  
[2025-03-18 03:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:24:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:25:05
    [end_date_ymd] => 2025-03-18 03:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:25:05' and `end` < '2025-03-18 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-18 03:25:17] Production.INFO: count ==388  
[2025-03-18 03:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:25:05 - End Time 2025-03-18 03:25:05  
[2025-03-18 03:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705391', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705391', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705391', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705391', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:25:17] Production.INFO: ProcessCDR(1,14705391,1,1,2)  
[2025-03-18 03:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705391', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705391', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:25:20] Production.INFO: ==17470== Releasing lock...  
[2025-03-18 03:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:25:20] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:26:05
    [end_date_ymd] => 2025-03-18 03:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:26:05' and `end` < '2025-03-18 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-18 03:26:18] Production.INFO: count ==384  
[2025-03-18 03:26:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:26:05 - End Time 2025-03-18 03:26:05  
[2025-03-18 03:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705396', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705396', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705396', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705396', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:26:18] Production.INFO: ProcessCDR(1,14705396,1,1,2)  
[2025-03-18 03:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705396,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705396,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705396', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705396', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:26:21] Production.INFO: ==17548== Releasing lock...  
[2025-03-18 03:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:26:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:27:05
    [end_date_ymd] => 2025-03-18 03:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:27:05' and `end` < '2025-03-18 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-18 03:27:17] Production.INFO: count ==384  
[2025-03-18 03:27:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:27:05 - End Time 2025-03-18 03:27:05  
[2025-03-18 03:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705401', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705401', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705401', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705401', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:27:17] Production.INFO: ProcessCDR(1,14705401,1,1,2)  
[2025-03-18 03:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705401,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705401,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705401', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705401', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:27:21] Production.INFO: ==17621== Releasing lock...  
[2025-03-18 03:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:27:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:28:05
    [end_date_ymd] => 2025-03-18 03:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:28:05' and `end` < '2025-03-18 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-18 03:28:17] Production.INFO: count ==381  
[2025-03-18 03:28:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:28:05 - End Time 2025-03-18 03:28:05  
[2025-03-18 03:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705406', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705406', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705406', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705406', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:28:18] Production.INFO: ProcessCDR(1,14705406,1,1,2)  
[2025-03-18 03:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705406,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705406,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705406', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705406', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:28:21] Production.INFO: ==17692== Releasing lock...  
[2025-03-18 03:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:28:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:29:05
    [end_date_ymd] => 2025-03-18 03:29:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:29:05' and `end` < '2025-03-18 03: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-18 03:29:17] Production.INFO: count ==379  
[2025-03-18 03:29:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:29:05 - End Time 2025-03-18 03:29:05  
[2025-03-18 03:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705411', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705411', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705411', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705411', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:29:17] Production.INFO: ProcessCDR(1,14705411,1,1,2)  
[2025-03-18 03:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705411,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705411,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705411', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705411', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:29:21] Production.INFO: ==17788== Releasing lock...  
[2025-03-18 03:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:29:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:30:06
    [end_date_ymd] => 2025-03-18 03:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:30:06' and `end` < '2025-03-18 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-18 03:30:19] Production.INFO: count ==369  
[2025-03-18 03:30:19] Production.ERROR: pbx CDR StartTime 2025-03-18 00:30:06 - End Time 2025-03-18 03:30:06  
[2025-03-18 03:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705417', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705417', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:30:19] Production.INFO: ProcessCDR(1,14705417,1,1,2)  
[2025-03-18 03:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:30:22] Production.INFO: ==17913== Releasing lock...  
[2025-03-18 03:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:30:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:31:05
    [end_date_ymd] => 2025-03-18 03:31:05
    [RateCDR] => 1
)
  
[2025-03-18 03:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:31:05' and `end` < '2025-03-18 03:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:31:17] Production.INFO: count ==363  
[2025-03-18 03:31:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:31:05 - End Time 2025-03-18 03:31:05  
[2025-03-18 03:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705422', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705422', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:31:17] Production.INFO: ProcessCDR(1,14705422,1,1,2)  
[2025-03-18 03:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:31:21] Production.INFO: ==18005== Releasing lock...  
[2025-03-18 03:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:31:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:32:06
    [end_date_ymd] => 2025-03-18 03:32:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:32:06' and `end` < '2025-03-18 03: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-18 03:32:18] Production.INFO: count ==362  
[2025-03-18 03:32:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:32:06 - End Time 2025-03-18 03:32:06  
[2025-03-18 03:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705427', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705427', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705427', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705427', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:32:18] Production.INFO: ProcessCDR(1,14705427,1,1,2)  
[2025-03-18 03:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:32:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705427', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:32:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705427', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:32:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:32:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:32:22] Production.INFO: ==18081== Releasing lock...  
[2025-03-18 03:32:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:32:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:33:06
    [end_date_ymd] => 2025-03-18 03:33:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:33:06' and `end` < '2025-03-18 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-18 03:33:18] Production.INFO: count ==362  
[2025-03-18 03:33:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:33:06 - End Time 2025-03-18 03:33:06  
[2025-03-18 03:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705432', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705432', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705432', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705432', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:33:18] Production.INFO: ProcessCDR(1,14705432,1,1,2)  
[2025-03-18 03:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705432', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705432', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:33:21] Production.INFO: ==18160== Releasing lock...  
[2025-03-18 03:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:33:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:34:05
    [end_date_ymd] => 2025-03-18 03:34:05
    [RateCDR] => 1
)
  
[2025-03-18 03:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:34:05' and `end` < '2025-03-18 03:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:34:18] Production.INFO: count ==361  
[2025-03-18 03:34:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:34:05 - End Time 2025-03-18 03:34:05  
[2025-03-18 03:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705437', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705437', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705437', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705437', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:34:18] Production.INFO: ProcessCDR(1,14705437,1,1,2)  
[2025-03-18 03:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705437', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705437', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:34:21] Production.INFO: ==18234== Releasing lock...  
[2025-03-18 03:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:34:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:35:05
    [end_date_ymd] => 2025-03-18 03:35:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:35:05' and `end` < '2025-03-18 03: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-18 03:35:17] Production.INFO: count ==348  
[2025-03-18 03:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:35:05 - End Time 2025-03-18 03:35:05  
[2025-03-18 03:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705442', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705442', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705442', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705442', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:35:17] Production.INFO: ProcessCDR(1,14705442,1,1,2)  
[2025-03-18 03:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705442', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705442', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:35:21] Production.INFO: ==18307== Releasing lock...  
[2025-03-18 03:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:35:21] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:36:06
    [end_date_ymd] => 2025-03-18 03:36:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:36:06' and `end` < '2025-03-18 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-18 03:36:18] Production.INFO: count ==347  
[2025-03-18 03:36:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:36:06 - End Time 2025-03-18 03:36:06  
[2025-03-18 03:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705447', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705447', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705447', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705447', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:36:18] Production.INFO: ProcessCDR(1,14705447,1,1,2)  
[2025-03-18 03:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:36:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:36:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705447', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:36:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705447', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:36:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:36:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:36:22] Production.INFO: ==18380== Releasing lock...  
[2025-03-18 03:36:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:36:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:37:05
    [end_date_ymd] => 2025-03-18 03:37:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:37:05' and `end` < '2025-03-18 03: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-18 03:37:17] Production.INFO: count ==347  
[2025-03-18 03:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:37:05 - End Time 2025-03-18 03:37:05  
[2025-03-18 03:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705452', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705452', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705452', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705452', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:37:18] Production.INFO: ProcessCDR(1,14705452,1,1,2)  
[2025-03-18 03:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705452,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705452,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705452', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705452', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:37:21] Production.INFO: ==18491== Releasing lock...  
[2025-03-18 03:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:37:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:38:06
    [end_date_ymd] => 2025-03-18 03:38:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:38:06' and `end` < '2025-03-18 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-18 03:38:18] Production.INFO: count ==350  
[2025-03-18 03:38:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:38:06 - End Time 2025-03-18 03:38:06  
[2025-03-18 03:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705457', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705457', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705457', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705457', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:38:18] Production.INFO: ProcessCDR(1,14705457,1,1,2)  
[2025-03-18 03:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705457,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:38:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705457,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705457', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705457', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:38:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:38:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:38:22] Production.INFO: ==18564== Releasing lock...  
[2025-03-18 03:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:38:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:39:05
    [end_date_ymd] => 2025-03-18 03:39:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:39:05' and `end` < '2025-03-18 03: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-18 03:39:17] Production.INFO: count ==344  
[2025-03-18 03:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:39:05 - End Time 2025-03-18 03:39:05  
[2025-03-18 03:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705462', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705462', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705462', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705462', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:39:18] Production.INFO: ProcessCDR(1,14705462,1,1,2)  
[2025-03-18 03:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705462,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705462,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705462', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705462', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:39:21] Production.INFO: ==18637== Releasing lock...  
[2025-03-18 03:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:39:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 03:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:40:06
    [end_date_ymd] => 2025-03-18 03:40:06
    [RateCDR] => 1
)
  
[2025-03-18 03:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:40:06' and `end` < '2025-03-18 03:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:40:18] Production.INFO: count ==346  
[2025-03-18 03:40:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:40:06 - End Time 2025-03-18 03:40:06  
[2025-03-18 03:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705466', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705466', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705466', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705466', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:40:18] Production.INFO: ProcessCDR(1,14705466,1,1,2)  
[2025-03-18 03:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705466', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705466', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:40:22] Production.INFO: ==18711== Releasing lock...  
[2025-03-18 03:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:40:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 03:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:41:05
    [end_date_ymd] => 2025-03-18 03:41:05
    [RateCDR] => 1
)
  
[2025-03-18 03:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:41:05' and `end` < '2025-03-18 03:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:41:17] Production.INFO: count ==346  
[2025-03-18 03:41:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:41:05 - End Time 2025-03-18 03:41:05  
[2025-03-18 03:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705473', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705473', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:41:17] Production.INFO: ProcessCDR(1,14705473,1,1,2)  
[2025-03-18 03:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:41:21] Production.INFO: ==18785== Releasing lock...  
[2025-03-18 03:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:41:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 03:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:42:06
    [end_date_ymd] => 2025-03-18 03:42:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:42:06' and `end` < '2025-03-18 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-18 03:42:18] Production.INFO: count ==343  
[2025-03-18 03:42:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:42:06 - End Time 2025-03-18 03:42:06  
[2025-03-18 03:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705478', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705478', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705478', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705478', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:42:18] Production.INFO: ProcessCDR(1,14705478,1,1,2)  
[2025-03-18 03:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705478', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705478', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:42:22] Production.INFO: ==18858== Releasing lock...  
[2025-03-18 03:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:42:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:43:05
    [end_date_ymd] => 2025-03-18 03:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:43:05' and `end` < '2025-03-18 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-18 03:43:17] Production.INFO: count ==343  
[2025-03-18 03:43:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:43:05 - End Time 2025-03-18 03:43:05  
[2025-03-18 03:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705483', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705483', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705483', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705483', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:43:17] Production.INFO: ProcessCDR(1,14705483,1,1,2)  
[2025-03-18 03:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705483', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705483', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:43:21] Production.INFO: ==18929== Releasing lock...  
[2025-03-18 03:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:43:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:44:06
    [end_date_ymd] => 2025-03-18 03:44:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:44:06' and `end` < '2025-03-18 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-18 03:44:18] Production.INFO: count ==343  
[2025-03-18 03:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:44:06 - End Time 2025-03-18 03:44:06  
[2025-03-18 03:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705488', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705488', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705488', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705488', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:44:18] Production.INFO: ProcessCDR(1,14705488,1,1,2)  
[2025-03-18 03:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:44:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:44:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:44:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705488', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705488', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:44:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:44:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:44:22] Production.INFO: ==19004== Releasing lock...  
[2025-03-18 03:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:44:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:45:05
    [end_date_ymd] => 2025-03-18 03:45:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:45:05' and `end` < '2025-03-18 03: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-18 03:45:17] Production.INFO: count ==343  
[2025-03-18 03:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:45:05 - End Time 2025-03-18 03:45:05  
[2025-03-18 03:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705493', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705493', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705493', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705493', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:45:18] Production.INFO: ProcessCDR(1,14705493,1,1,2)  
[2025-03-18 03:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705493', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705493', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:45:21] Production.INFO: ==19087== Releasing lock...  
[2025-03-18 03:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:45:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:46:05
    [end_date_ymd] => 2025-03-18 03:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:46:05' and `end` < '2025-03-18 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-18 03:46:17] Production.INFO: count ==343  
[2025-03-18 03:46:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:46:05 - End Time 2025-03-18 03:46:05  
[2025-03-18 03:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705498', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705498', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705498', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705498', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:46:17] Production.INFO: ProcessCDR(1,14705498,1,1,2)  
[2025-03-18 03:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705498,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705498,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705498', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705498', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:46:21] Production.INFO: ==19157== Releasing lock...  
[2025-03-18 03:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:46:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:47:05
    [end_date_ymd] => 2025-03-18 03:47:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:47:05' and `end` < '2025-03-18 03:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:47:17] Production.INFO: count ==343  
[2025-03-18 03:47:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:47:05 - End Time 2025-03-18 03:47:05  
[2025-03-18 03:47:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705503', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705503', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705503', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:47:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705503', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:47:17] Production.INFO: ProcessCDR(1,14705503,1,1,2)  
[2025-03-18 03:47:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705503,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705503,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705503', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705503', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:47:21] Production.INFO: ==19230== Releasing lock...  
[2025-03-18 03:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:47:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:48:06
    [end_date_ymd] => 2025-03-18 03:48:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:48:06' and `end` < '2025-03-18 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-18 03:48:18] Production.INFO: count ==340  
[2025-03-18 03:48:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:48:06 - End Time 2025-03-18 03:48:06  
[2025-03-18 03:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705508', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705508', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705508', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705508', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:48:18] Production.INFO: ProcessCDR(1,14705508,1,1,2)  
[2025-03-18 03:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:48:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705508,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:48:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:48:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705508,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705508', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705508', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:48:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:48:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:48:22] Production.INFO: ==19305== Releasing lock...  
[2025-03-18 03:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:48:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:49:05
    [end_date_ymd] => 2025-03-18 03:49:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:49:05' and `end` < '2025-03-18 03: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-18 03:49:18] Production.INFO: count ==338  
[2025-03-18 03:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:49:05 - End Time 2025-03-18 03:49:05  
[2025-03-18 03:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705513', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705513', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705513', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705513', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:49:18] Production.INFO: ProcessCDR(1,14705513,1,1,2)  
[2025-03-18 03:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705513,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705513,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705513', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705513', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:49:21] Production.INFO: ==19381== Releasing lock...  
[2025-03-18 03:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:49:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 03:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:50:06
    [end_date_ymd] => 2025-03-18 03:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 00:50:06' and `end` < '2025-03-18 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-18 03:50:18] Production.INFO: count ==328  
[2025-03-18 03:50:19] Production.ERROR: pbx CDR StartTime 2025-03-18 00:50:06 - End Time 2025-03-18 03:50:06  
[2025-03-18 03:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705519', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705519', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:50:19] Production.INFO: ProcessCDR(1,14705519,1,1,2)  
[2025-03-18 03:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:50:22] Production.INFO: ==19453== Releasing lock...  
[2025-03-18 03:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:50:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:51:05
    [end_date_ymd] => 2025-03-18 03:51:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:51:05' and `end` < '2025-03-18 03: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-18 03:51:17] Production.INFO: count ==322  
[2025-03-18 03:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:51:05 - End Time 2025-03-18 03:51:05  
[2025-03-18 03:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705524', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705524', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:51:18] Production.INFO: ProcessCDR(1,14705524,1,1,2)  
[2025-03-18 03:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:51:21] Production.INFO: ==19531== Releasing lock...  
[2025-03-18 03:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:51:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:52:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:52:07
    [end_date_ymd] => 2025-03-18 03:52:07
    [RateCDR] => 1
)
  
[2025-03-18 03:52: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-18 00:52:07' and `end` < '2025-03-18 03:52: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-18 03:52:19] Production.INFO: count ==320  
[2025-03-18 03:52:19] Production.ERROR: pbx CDR StartTime 2025-03-18 00:52:07 - End Time 2025-03-18 03:52:07  
[2025-03-18 03:52:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705529', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705529', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705529', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705529', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:52:19] Production.INFO: ProcessCDR(1,14705529,1,1,2)  
[2025-03-18 03:52:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:52:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:52:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705529', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705529', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:52:23] Production.INFO: ==19646== Releasing lock...  
[2025-03-18 03:52:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:52:23] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 03:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:53:06
    [end_date_ymd] => 2025-03-18 03:53:06
    [RateCDR] => 1
)
  
[2025-03-18 03:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:53:06' and `end` < '2025-03-18 03:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:53:18] Production.INFO: count ==315  
[2025-03-18 03:53:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:53:06 - End Time 2025-03-18 03:53:06  
[2025-03-18 03:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705534', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705534', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705534', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705534', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:53:18] Production.INFO: ProcessCDR(1,14705534,1,1,2)  
[2025-03-18 03:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705534', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705534', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:53:22] Production.INFO: ==19725== Releasing lock...  
[2025-03-18 03:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:53:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:54:06
    [end_date_ymd] => 2025-03-18 03:54:06
    [RateCDR] => 1
)
  
[2025-03-18 03:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:54:06' and `end` < '2025-03-18 03:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:54:18] Production.INFO: count ==314  
[2025-03-18 03:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:54:06 - End Time 2025-03-18 03:54:06  
[2025-03-18 03:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705539', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705539', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705539', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705539', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:54:18] Production.INFO: ProcessCDR(1,14705539,1,1,2)  
[2025-03-18 03:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705539', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705539', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:54:22] Production.INFO: ==19798== Releasing lock...  
[2025-03-18 03:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:54:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:55:06
    [end_date_ymd] => 2025-03-18 03:55:06
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:55:06' and `end` < '2025-03-18 03: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-18 03:55:18] Production.INFO: count ==314  
[2025-03-18 03:55:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:55:06 - End Time 2025-03-18 03:55:06  
[2025-03-18 03:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705544', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705544', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705544', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705544', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:55:18] Production.INFO: ProcessCDR(1,14705544,1,1,2)  
[2025-03-18 03:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705544', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705544', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:55:22] Production.INFO: ==19872== Releasing lock...  
[2025-03-18 03:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:55:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 03:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:56:05
    [end_date_ymd] => 2025-03-18 03:56:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:56:05' and `end` < '2025-03-18 03: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-18 03:56:17] Production.INFO: count ==309  
[2025-03-18 03:56:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:56:05 - End Time 2025-03-18 03:56:05  
[2025-03-18 03:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705549', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705549', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705549', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705549', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:56:17] Production.INFO: ProcessCDR(1,14705549,1,1,2)  
[2025-03-18 03:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:56:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705549,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:56:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705549,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705549', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705549', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:56:21] Production.INFO: ==19947== Releasing lock...  
[2025-03-18 03:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:56:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:57:06
    [end_date_ymd] => 2025-03-18 03:57:06
    [RateCDR] => 1
)
  
[2025-03-18 03:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 00:57:06' and `end` < '2025-03-18 03:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 03:57:18] Production.INFO: count ==308  
[2025-03-18 03:57:18] Production.ERROR: pbx CDR StartTime 2025-03-18 00:57:06 - End Time 2025-03-18 03:57:06  
[2025-03-18 03:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705554', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705554', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705554', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705554', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:57:18] Production.INFO: ProcessCDR(1,14705554,1,1,2)  
[2025-03-18 03:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705554,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:57:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705554,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705554', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705554', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:57:22] Production.INFO: ==20022== Releasing lock...  
[2025-03-18 03:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:57:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:58:05
    [end_date_ymd] => 2025-03-18 03:58:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:58:05' and `end` < '2025-03-18 03: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-18 03:58:17] Production.INFO: count ==311  
[2025-03-18 03:58:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:58:05 - End Time 2025-03-18 03:58:05  
[2025-03-18 03:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705559', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705559', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705559', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705559', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:58:18] Production.INFO: ProcessCDR(1,14705559,1,1,2)  
[2025-03-18 03:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705559,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705559,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705559', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705559', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:58:21] Production.INFO: ==20098== Releasing lock...  
[2025-03-18 03:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:58:21] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 03:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 00:59:05
    [end_date_ymd] => 2025-03-18 03:59:05
    [RateCDR] => 1
)
  
[2025-03-18 03: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-18 00:59:05' and `end` < '2025-03-18 03: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-18 03:59:17] Production.INFO: count ==311  
[2025-03-18 03:59:17] Production.ERROR: pbx CDR StartTime 2025-03-18 00:59:05 - End Time 2025-03-18 03:59:05  
[2025-03-18 03:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 03:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705564', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705564', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705564', 'tblTempVendorCDR_20' ) start  
[2025-03-18 03:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705564', 'tblTempVendorCDR_20' ) end  
[2025-03-18 03:59:18] Production.INFO: ProcessCDR(1,14705564,1,1,2)  
[2025-03-18 03:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705564,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 03:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:59:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705564,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 03:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705564', 'tblTempUsageDetail_20' ) start  
[2025-03-18 03:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705564', 'tblTempUsageDetail_20' ) end  
[2025-03-18 03:59:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 03:59:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 03:59:22] Production.INFO: ==20171== Releasing lock...  
[2025-03-18 03:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 03:59:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 04:00:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:00:05
    [end_date_ymd] => 2025-03-18 04:00:05
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:00:05' and `end` < '2025-03-18 04: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-18 04:00:18] Production.INFO: count ==303  
[2025-03-18 04:00:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:00:05 - End Time 2025-03-18 04:00:05  
[2025-03-18 04:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705569', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705569', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705569', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705569', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:00:18] Production.INFO: ProcessCDR(1,14705569,1,1,2)  
[2025-03-18 04:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705569,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705569,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705569', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705569', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:00:22] Production.INFO: ==20246== Releasing lock...  
[2025-03-18 04:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:00:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 04:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:01:06
    [end_date_ymd] => 2025-03-18 04:01:06
    [RateCDR] => 1
)
  
[2025-03-18 04:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:01:06' and `end` < '2025-03-18 04:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:01:18] Production.INFO: count ==297  
[2025-03-18 04:01:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:01:06 - End Time 2025-03-18 04:01:06  
[2025-03-18 04:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705576', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705576', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705576', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705576', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:01:18] Production.INFO: ProcessCDR(1,14705576,1,1,2)  
[2025-03-18 04:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:01:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:01:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:01:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705576', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705576', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:01:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:01:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:01:23] Production.INFO: ==20336== Releasing lock...  
[2025-03-18 04:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:01:23] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:02:06
    [end_date_ymd] => 2025-03-18 04:02:06
    [RateCDR] => 1
)
  
[2025-03-18 04:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:02:06' and `end` < '2025-03-18 04:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:02:18] Production.INFO: count ==297  
[2025-03-18 04:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:02:06 - End Time 2025-03-18 04:02:06  
[2025-03-18 04:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705581', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705581', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705581', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705581', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:02:18] Production.INFO: ProcessCDR(1,14705581,1,1,2)  
[2025-03-18 04:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:02:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:02:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:02:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705581', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705581', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:02:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:02:22] Production.INFO: ==20408== Releasing lock...  
[2025-03-18 04:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:02:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:03:06
    [end_date_ymd] => 2025-03-18 04:03:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:03:06' and `end` < '2025-03-18 04: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-18 04:03:18] Production.INFO: count ==294  
[2025-03-18 04:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:03:06 - End Time 2025-03-18 04:03:06  
[2025-03-18 04:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705586', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705586', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:03:18] Production.INFO: ProcessCDR(1,14705586,1,1,2)  
[2025-03-18 04:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:03:22] Production.INFO: ==20481== Releasing lock...  
[2025-03-18 04:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:03:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 04:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:04:06
    [end_date_ymd] => 2025-03-18 04:04:06
    [RateCDR] => 1
)
  
[2025-03-18 04:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:04:06' and `end` < '2025-03-18 04:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:04:18] Production.INFO: count ==293  
[2025-03-18 04:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:04:06 - End Time 2025-03-18 04:04:06  
[2025-03-18 04:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705591', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705591', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:04:18] Production.INFO: ProcessCDR(1,14705591,1,1,2)  
[2025-03-18 04:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:04:22] Production.INFO: ==20552== Releasing lock...  
[2025-03-18 04:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:04:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:05:06
    [end_date_ymd] => 2025-03-18 04:05:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:05:06' and `end` < '2025-03-18 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-18 04:05:18] Production.INFO: count ==292  
[2025-03-18 04:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:05:06 - End Time 2025-03-18 04:05:06  
[2025-03-18 04:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705595', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705595', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705595', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705595', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:05:18] Production.INFO: ProcessCDR(1,14705595,1,1,2)  
[2025-03-18 04:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705595', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705595', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:05:22] Production.INFO: ==20625== Releasing lock...  
[2025-03-18 04:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:05:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 04:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:06:06
    [end_date_ymd] => 2025-03-18 04:06:06
    [RateCDR] => 1
)
  
[2025-03-18 04:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:06:06' and `end` < '2025-03-18 04:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:06:18] Production.INFO: count ==292  
[2025-03-18 04:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:06:06 - End Time 2025-03-18 04:06:06  
[2025-03-18 04:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705601', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705601', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:06:18] Production.INFO: ProcessCDR(1,14705601,1,1,2)  
[2025-03-18 04:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:06:22] Production.INFO: ==20698== Releasing lock...  
[2025-03-18 04:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:06:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 04:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:07:06
    [end_date_ymd] => 2025-03-18 04:07:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:07:06' and `end` < '2025-03-18 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-18 04:07:18] Production.INFO: count ==292  
[2025-03-18 04:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:07:06 - End Time 2025-03-18 04:07:06  
[2025-03-18 04:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705606', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705606', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:07:18] Production.INFO: ProcessCDR(1,14705606,1,1,2)  
[2025-03-18 04:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:07:22] Production.INFO: ==20809== Releasing lock...  
[2025-03-18 04:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:07:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 04:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:08:05
    [end_date_ymd] => 2025-03-18 04:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:08:05' and `end` < '2025-03-18 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-18 04:08:18] Production.INFO: count ==292  
[2025-03-18 04:08:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:08:05 - End Time 2025-03-18 04:08:05  
[2025-03-18 04:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705611', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705611', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:08:18] Production.INFO: ProcessCDR(1,14705611,1,1,2)  
[2025-03-18 04:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:08:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:08:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:08:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:08:22] Production.INFO: ==20880== Releasing lock...  
[2025-03-18 04:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:08:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 04:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:09:06
    [end_date_ymd] => 2025-03-18 04:09:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:09:06' and `end` < '2025-03-18 04: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-18 04:09:18] Production.INFO: count ==290  
[2025-03-18 04:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:09:06 - End Time 2025-03-18 04:09:06  
[2025-03-18 04:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705616', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705616', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:09:18] Production.INFO: ProcessCDR(1,14705616,1,1,2)  
[2025-03-18 04:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:09:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:09:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:09:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:09:22] Production.INFO: ==20953== Releasing lock...  
[2025-03-18 04:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:09:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:10:06
    [end_date_ymd] => 2025-03-18 04:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:10:06' and `end` < '2025-03-18 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-18 04:10:18] Production.INFO: count ==276  
[2025-03-18 04:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:10:06 - End Time 2025-03-18 04:10:06  
[2025-03-18 04:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705622', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705622', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705622', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705622', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:10:19] Production.INFO: ProcessCDR(1,14705622,1,1,2)  
[2025-03-18 04:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705622', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705622', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:10:22] Production.INFO: ==21028== Releasing lock...  
[2025-03-18 04:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:10:22] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:11:06
    [end_date_ymd] => 2025-03-18 04:11:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:11:06' and `end` < '2025-03-18 04: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-18 04:11:18] Production.INFO: count ==274  
[2025-03-18 04:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:11:06 - End Time 2025-03-18 04:11:06  
[2025-03-18 04:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705627', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705627', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705627', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705627', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:11:18] Production.INFO: ProcessCDR(1,14705627,1,1,2)  
[2025-03-18 04:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705627', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705627', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:11:21] Production.INFO: ==21103== Releasing lock...  
[2025-03-18 04:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:11:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:12:06
    [end_date_ymd] => 2025-03-18 04:12:06
    [RateCDR] => 1
)
  
[2025-03-18 04:12:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:12:06' and `end` < '2025-03-18 04:12:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:12:18] Production.INFO: count ==274  
[2025-03-18 04:12:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:12:06 - End Time 2025-03-18 04:12:06  
[2025-03-18 04:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705632', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705632', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705632', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705632', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:12:18] Production.INFO: ProcessCDR(1,14705632,1,1,2)  
[2025-03-18 04:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705632,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705632,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705632,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705632,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705632', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705632', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:12:21] Production.INFO: ==21185== Releasing lock...  
[2025-03-18 04:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:12:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:13:05
    [end_date_ymd] => 2025-03-18 04:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:13:05' and `end` < '2025-03-18 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-18 04:13:17] Production.INFO: count ==274  
[2025-03-18 04:13:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:13:05 - End Time 2025-03-18 04:13:05  
[2025-03-18 04:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705637', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705637', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:13:17] Production.INFO: ProcessCDR(1,14705637,1,1,2)  
[2025-03-18 04:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:13:21] Production.INFO: ==21255== Releasing lock...  
[2025-03-18 04:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:13:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:14:05
    [end_date_ymd] => 2025-03-18 04:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:14:05' and `end` < '2025-03-18 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-18 04:14:17] Production.INFO: count ==274  
[2025-03-18 04:14:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:14:05 - End Time 2025-03-18 04:14:05  
[2025-03-18 04:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705642', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705642', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705642', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705642', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:14:17] Production.INFO: ProcessCDR(1,14705642,1,1,2)  
[2025-03-18 04:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705642,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705642,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705642,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705642,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705642', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705642', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:14:21] Production.INFO: ==21327== Releasing lock...  
[2025-03-18 04:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:14:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:15:06
    [end_date_ymd] => 2025-03-18 04:15:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:15:06' and `end` < '2025-03-18 04: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-18 04:15:18] Production.INFO: count ==274  
[2025-03-18 04:15:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:15:06 - End Time 2025-03-18 04:15:06  
[2025-03-18 04:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705647', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705647', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705647', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705647', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:15:18] Production.INFO: ProcessCDR(1,14705647,1,1,2)  
[2025-03-18 04:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705647,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705647,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705647,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705647,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705647', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705647', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:15:21] Production.INFO: ==21402== Releasing lock...  
[2025-03-18 04:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:15:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:16:05
    [end_date_ymd] => 2025-03-18 04:16:05
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:16:05' and `end` < '2025-03-18 04: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-18 04:16:18] Production.INFO: count ==274  
[2025-03-18 04:16:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:16:05 - End Time 2025-03-18 04:16:05  
[2025-03-18 04:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705652', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705652', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:16:18] Production.INFO: ProcessCDR(1,14705652,1,1,2)  
[2025-03-18 04:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:16:21] Production.INFO: ==21475== Releasing lock...  
[2025-03-18 04:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:16:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:17:05
    [end_date_ymd] => 2025-03-18 04:17:05
    [RateCDR] => 1
)
  
[2025-03-18 04:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:17:05' and `end` < '2025-03-18 04:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:17:17] Production.INFO: count ==274  
[2025-03-18 04:17:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:17:05 - End Time 2025-03-18 04:17:05  
[2025-03-18 04:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705657', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705657', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:17:17] Production.INFO: ProcessCDR(1,14705657,1,1,2)  
[2025-03-18 04:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:17:21] Production.INFO: ==21545== Releasing lock...  
[2025-03-18 04:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:17:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:18:05
    [end_date_ymd] => 2025-03-18 04:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:18:05' and `end` < '2025-03-18 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-18 04:18:17] Production.INFO: count ==274  
[2025-03-18 04:18:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:18:05 - End Time 2025-03-18 04:18:05  
[2025-03-18 04:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705662', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705662', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:18:17] Production.INFO: ProcessCDR(1,14705662,1,1,2)  
[2025-03-18 04:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:18:21] Production.INFO: ==21618== Releasing lock...  
[2025-03-18 04:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:18:21] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:19:05
    [end_date_ymd] => 2025-03-18 04:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:19:05' and `end` < '2025-03-18 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-18 04:19:17] Production.INFO: count ==274  
[2025-03-18 04:19:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:19:05 - End Time 2025-03-18 04:19:05  
[2025-03-18 04:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705667', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705667', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:19:17] Production.INFO: ProcessCDR(1,14705667,1,1,2)  
[2025-03-18 04:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:19:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:19:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:19:20] Production.INFO: ==21691== Releasing lock...  
[2025-03-18 04:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:19:20] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 04:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:20:06
    [end_date_ymd] => 2025-03-18 04:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:20:06' and `end` < '2025-03-18 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-18 04:20:18] Production.INFO: count ==268  
[2025-03-18 04:20:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:20:06 - End Time 2025-03-18 04:20:06  
[2025-03-18 04:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705673', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705673', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705673', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705673', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:20:18] Production.INFO: ProcessCDR(1,14705673,1,1,2)  
[2025-03-18 04:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705673', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705673', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:20:21] Production.INFO: ==21765== Releasing lock...  
[2025-03-18 04:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:20:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:21:06
    [end_date_ymd] => 2025-03-18 04:21:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:21:06' and `end` < '2025-03-18 04: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-18 04:21:18] Production.INFO: count ==268  
[2025-03-18 04:21:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:21:06 - End Time 2025-03-18 04:21:06  
[2025-03-18 04:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705678', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705678', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705678', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705678', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:21:18] Production.INFO: ProcessCDR(1,14705678,1,1,2)  
[2025-03-18 04:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705678', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705678', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:21:21] Production.INFO: ==21839== Releasing lock...  
[2025-03-18 04:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:21:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:22:05
    [end_date_ymd] => 2025-03-18 04:22:05
    [RateCDR] => 1
)
  
[2025-03-18 04:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:22:05' and `end` < '2025-03-18 04:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:22:17] Production.INFO: count ==257  
[2025-03-18 04:22:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:22:05 - End Time 2025-03-18 04:22:05  
[2025-03-18 04:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705683', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705683', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:22:17] Production.INFO: ProcessCDR(1,14705683,1,1,2)  
[2025-03-18 04:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:22:20] Production.INFO: ==21911== Releasing lock...  
[2025-03-18 04:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:22:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:23:06
    [end_date_ymd] => 2025-03-18 04:23:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:23:06' and `end` < '2025-03-18 04: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-18 04:23:18] Production.INFO: count ==260  
[2025-03-18 04:23:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:23:06 - End Time 2025-03-18 04:23:06  
[2025-03-18 04:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705688', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705688', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:23:18] Production.INFO: ProcessCDR(1,14705688,1,1,2)  
[2025-03-18 04:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:23:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:23:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:23:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:23:22] Production.INFO: ==22025== Releasing lock...  
[2025-03-18 04:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:23:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:24:05
    [end_date_ymd] => 2025-03-18 04:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:24:05' and `end` < '2025-03-18 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-18 04:24:17] Production.INFO: count ==260  
[2025-03-18 04:24:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:24:05 - End Time 2025-03-18 04:24:05  
[2025-03-18 04:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705693', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705693', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705693', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705693', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:24:17] Production.INFO: ProcessCDR(1,14705693,1,1,2)  
[2025-03-18 04:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705693,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705693,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705693,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705693,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705693', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705693', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:24:21] Production.INFO: ==22098== Releasing lock...  
[2025-03-18 04:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:24:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:25:05
    [end_date_ymd] => 2025-03-18 04:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:25:05' and `end` < '2025-03-18 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-18 04:25:17] Production.INFO: count ==259  
[2025-03-18 04:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:25:05 - End Time 2025-03-18 04:25:05  
[2025-03-18 04:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705698', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705698', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705698', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705698', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:25:17] Production.INFO: ProcessCDR(1,14705698,1,1,2)  
[2025-03-18 04:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705698,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705698,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705698,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705698,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705698', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705698', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:25:21] Production.INFO: ==22172== Releasing lock...  
[2025-03-18 04:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:25:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:26:05
    [end_date_ymd] => 2025-03-18 04:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:26:05' and `end` < '2025-03-18 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-18 04:26:17] Production.INFO: count ==259  
[2025-03-18 04:26:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:26:05 - End Time 2025-03-18 04:26:05  
[2025-03-18 04:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705703', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705703', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:26:18] Production.INFO: ProcessCDR(1,14705703,1,1,2)  
[2025-03-18 04:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:26:21] Production.INFO: ==22248== Releasing lock...  
[2025-03-18 04:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:26:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:27:05
    [end_date_ymd] => 2025-03-18 04:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:27:05' and `end` < '2025-03-18 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-18 04:27:17] Production.INFO: count ==253  
[2025-03-18 04:27:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:27:05 - End Time 2025-03-18 04:27:05  
[2025-03-18 04:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705708', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705708', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:27:17] Production.INFO: ProcessCDR(1,14705708,1,1,2)  
[2025-03-18 04:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:27:21] Production.INFO: ==22320== Releasing lock...  
[2025-03-18 04:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:27:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 04:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:28:05
    [end_date_ymd] => 2025-03-18 04:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:28:05' and `end` < '2025-03-18 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-18 04:28:17] Production.INFO: count ==254  
[2025-03-18 04:28:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:28:05 - End Time 2025-03-18 04:28:05  
[2025-03-18 04:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705713', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705713', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:28:17] Production.INFO: ProcessCDR(1,14705713,1,1,2)  
[2025-03-18 04:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:28:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:28:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:28:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:28:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:28:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:28:23] Production.INFO: ==22392== Releasing lock...  
[2025-03-18 04:28:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:28:23] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:29:05
    [end_date_ymd] => 2025-03-18 04:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:29:05' and `end` < '2025-03-18 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-18 04:29:17] Production.INFO: count ==250  
[2025-03-18 04:29:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:29:05 - End Time 2025-03-18 04:29:05  
[2025-03-18 04:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705715', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705715', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705715', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705715', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:29:18] Production.INFO: ProcessCDR(1,14705715,1,1,2)  
[2025-03-18 04:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705715', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705715', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:29:21] Production.INFO: ==22464== Releasing lock...  
[2025-03-18 04:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:29:21] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:30:06
    [end_date_ymd] => 2025-03-18 04:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:30:06' and `end` < '2025-03-18 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-18 04:30:18] Production.INFO: count ==237  
[2025-03-18 04:30:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:30:06 - End Time 2025-03-18 04:30:06  
[2025-03-18 04:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705725', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705725', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705725', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705725', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:30:18] Production.INFO: ProcessCDR(1,14705725,1,1,2)  
[2025-03-18 04:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705725,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705725,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705725', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705725', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:30:22] Production.INFO: ==22542== Releasing lock...  
[2025-03-18 04:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:30:22] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:31:05
    [end_date_ymd] => 2025-03-18 04:31:05
    [RateCDR] => 1
)
  
[2025-03-18 04:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:31:05' and `end` < '2025-03-18 04:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:31:17] Production.INFO: count ==228  
[2025-03-18 04:31:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:31:05 - End Time 2025-03-18 04:31:05  
[2025-03-18 04:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705730', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705730', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705730', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705730', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:31:17] Production.INFO: ProcessCDR(1,14705730,1,1,2)  
[2025-03-18 04:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705730,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705730,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705730', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705730', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:31:21] Production.INFO: ==22688== Releasing lock...  
[2025-03-18 04:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:31:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 04:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:32:05
    [end_date_ymd] => 2025-03-18 04:32:05
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:32:05' and `end` < '2025-03-18 04: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-18 04:32:17] Production.INFO: count ==227  
[2025-03-18 04:32:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:32:05 - End Time 2025-03-18 04:32:05  
[2025-03-18 04:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705735', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705735', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705735', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705735', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:32:17] Production.INFO: ProcessCDR(1,14705735,1,1,2)  
[2025-03-18 04:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705735,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705735,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705735', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705735', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:32:21] Production.INFO: ==22760== Releasing lock...  
[2025-03-18 04:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:32:21] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 04:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:33:05
    [end_date_ymd] => 2025-03-18 04:33:05
    [RateCDR] => 1
)
  
[2025-03-18 04:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:33:05' and `end` < '2025-03-18 04:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:33:17] Production.INFO: count ==224  
[2025-03-18 04:33:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:33:05 - End Time 2025-03-18 04:33:05  
[2025-03-18 04:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705740', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705740', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705740', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705740', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:33:17] Production.INFO: ProcessCDR(1,14705740,1,1,2)  
[2025-03-18 04:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705740,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705740,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705740', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705740', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:33:20] Production.INFO: ==22834== Releasing lock...  
[2025-03-18 04:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:33:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:34:05
    [end_date_ymd] => 2025-03-18 04:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:34:05' and `end` < '2025-03-18 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-18 04:34:17] Production.INFO: count ==223  
[2025-03-18 04:34:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:34:05 - End Time 2025-03-18 04:34:05  
[2025-03-18 04:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705745', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705745', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705745', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705745', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:34:17] Production.INFO: ProcessCDR(1,14705745,1,1,2)  
[2025-03-18 04:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705745', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705745', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:34:21] Production.INFO: ==22908== Releasing lock...  
[2025-03-18 04:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:34:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:35:05
    [end_date_ymd] => 2025-03-18 04:35:05
    [RateCDR] => 1
)
  
[2025-03-18 04:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:35:05' and `end` < '2025-03-18 04:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:35:17] Production.INFO: count ==224  
[2025-03-18 04:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:35:05 - End Time 2025-03-18 04:35:05  
[2025-03-18 04:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705750', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705750', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705750', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705750', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:35:17] Production.INFO: ProcessCDR(1,14705750,1,1,2)  
[2025-03-18 04:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705750', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705750', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:35:20] Production.INFO: ==22978== Releasing lock...  
[2025-03-18 04:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:35:20] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 04:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:36:05
    [end_date_ymd] => 2025-03-18 04:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:36:05' and `end` < '2025-03-18 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-18 04:36:17] Production.INFO: count ==219  
[2025-03-18 04:36:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:36:05 - End Time 2025-03-18 04:36:05  
[2025-03-18 04:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705755', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705755', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705755', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705755', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:36:18] Production.INFO: ProcessCDR(1,14705755,1,1,2)  
[2025-03-18 04:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705755', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705755', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:36:21] Production.INFO: ==23052== Releasing lock...  
[2025-03-18 04:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:36:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-03-18 04:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:37:05
    [end_date_ymd] => 2025-03-18 04:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:37:05' and `end` < '2025-03-18 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-18 04:37:17] Production.INFO: count ==209  
[2025-03-18 04:37:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:37:05 - End Time 2025-03-18 04:37:05  
[2025-03-18 04:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705760', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705760', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705760', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705760', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:37:17] Production.INFO: ProcessCDR(1,14705760,1,1,2)  
[2025-03-18 04:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705760', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705760', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:37:20] Production.INFO: ==23129== Releasing lock...  
[2025-03-18 04:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:37:20] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:38:05
    [end_date_ymd] => 2025-03-18 04:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:38:05' and `end` < '2025-03-18 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-18 04:38:17] Production.INFO: count ==205  
[2025-03-18 04:38:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:38:05 - End Time 2025-03-18 04:38:05  
[2025-03-18 04:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705765', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705765', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705765', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705765', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:38:17] Production.INFO: ProcessCDR(1,14705765,1,1,2)  
[2025-03-18 04:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705765', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705765', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:38:21] Production.INFO: ==23243== Releasing lock...  
[2025-03-18 04:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:38:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:39:05
    [end_date_ymd] => 2025-03-18 04:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:39:05' and `end` < '2025-03-18 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-18 04:39:17] Production.INFO: count ==197  
[2025-03-18 04:39:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:39:05 - End Time 2025-03-18 04:39:05  
[2025-03-18 04:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705770', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705770', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705770', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705770', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:39:17] Production.INFO: ProcessCDR(1,14705770,1,1,2)  
[2025-03-18 04:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705770', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705770', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:39:20] Production.INFO: ==23316== Releasing lock...  
[2025-03-18 04:39:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:39:20] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:40:06
    [end_date_ymd] => 2025-03-18 04:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:40:06' and `end` < '2025-03-18 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-18 04:40:18] Production.INFO: count ==186  
[2025-03-18 04:40:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:40:06 - End Time 2025-03-18 04:40:06  
[2025-03-18 04:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705776', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705776', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705776', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705776', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:40:18] Production.INFO: ProcessCDR(1,14705776,1,1,2)  
[2025-03-18 04:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705776,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705776,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705776', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705776', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:40:21] Production.INFO: ==23395== Releasing lock...  
[2025-03-18 04:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:40:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:41:05
    [end_date_ymd] => 2025-03-18 04:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:41:05' and `end` < '2025-03-18 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-18 04:41:17] Production.INFO: count ==186  
[2025-03-18 04:41:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:41:05 - End Time 2025-03-18 04:41:05  
[2025-03-18 04:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705781', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705781', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705781', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705781', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:41:17] Production.INFO: ProcessCDR(1,14705781,1,1,2)  
[2025-03-18 04:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705781,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:41:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705781,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705781', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705781', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:41:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:41:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:41:20] Production.INFO: ==23471== Releasing lock...  
[2025-03-18 04:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:41:20] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:42:05
    [end_date_ymd] => 2025-03-18 04:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:42:05' and `end` < '2025-03-18 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-18 04:42:17] Production.INFO: count ==185  
[2025-03-18 04:42:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:42:05 - End Time 2025-03-18 04:42:05  
[2025-03-18 04:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705786', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705786', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705786', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705786', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:42:17] Production.INFO: ProcessCDR(1,14705786,1,1,2)  
[2025-03-18 04:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705786,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:42:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705786,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705786', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:42:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705786', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:42:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:42:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:42:20] Production.INFO: ==23543== Releasing lock...  
[2025-03-18 04:42:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:42:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:43:06
    [end_date_ymd] => 2025-03-18 04:43:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:43:06' and `end` < '2025-03-18 04: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-18 04:43:18] Production.INFO: count ==185  
[2025-03-18 04:43:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:43:06 - End Time 2025-03-18 04:43:06  
[2025-03-18 04:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705791', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705791', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705791', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705791', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:43:18] Production.INFO: ProcessCDR(1,14705791,1,1,2)  
[2025-03-18 04:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705791,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705791,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705791', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705791', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:43:21] Production.INFO: ==23620== Releasing lock...  
[2025-03-18 04:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:43:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:44:05
    [end_date_ymd] => 2025-03-18 04:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:44:05' and `end` < '2025-03-18 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-18 04:44:17] Production.INFO: count ==182  
[2025-03-18 04:44:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:44:05 - End Time 2025-03-18 04:44:05  
[2025-03-18 04:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705795', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705795', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705795', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705795', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:44:17] Production.INFO: ProcessCDR(1,14705795,1,1,2)  
[2025-03-18 04:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705795', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705795', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:44:20] Production.INFO: ==23689== Releasing lock...  
[2025-03-18 04:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:44:20] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:45:06
    [end_date_ymd] => 2025-03-18 04:45:06
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:45:06' and `end` < '2025-03-18 04: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-18 04:45:18] Production.INFO: count ==182  
[2025-03-18 04:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:45:06 - End Time 2025-03-18 04:45:06  
[2025-03-18 04:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705801', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705801', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705801', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705801', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:45:18] Production.INFO: ProcessCDR(1,14705801,1,1,2)  
[2025-03-18 04:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705801', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705801', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:45:21] Production.INFO: ==23764== Releasing lock...  
[2025-03-18 04:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:45:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:46:05
    [end_date_ymd] => 2025-03-18 04:46:05
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:46:05' and `end` < '2025-03-18 04: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-18 04:46:18] Production.INFO: count ==182  
[2025-03-18 04:46:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:46:05 - End Time 2025-03-18 04:46:05  
[2025-03-18 04:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705806', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705806', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705806', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705806', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:46:18] Production.INFO: ProcessCDR(1,14705806,1,1,2)  
[2025-03-18 04:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705806', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705806', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:46:21] Production.INFO: ==23837== Releasing lock...  
[2025-03-18 04:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:46:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:47:05
    [end_date_ymd] => 2025-03-18 04:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:47:05' and `end` < '2025-03-18 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-18 04:47:18] Production.INFO: count ==182  
[2025-03-18 04:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:47:05 - End Time 2025-03-18 04:47:05  
[2025-03-18 04:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705811', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705811', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705811', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705811', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:47:18] Production.INFO: ProcessCDR(1,14705811,1,1,2)  
[2025-03-18 04:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705811', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705811', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:47:21] Production.INFO: ==23910== Releasing lock...  
[2025-03-18 04:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:47:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:48:05
    [end_date_ymd] => 2025-03-18 04:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:48:05' and `end` < '2025-03-18 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-18 04:48:17] Production.INFO: count ==182  
[2025-03-18 04:48:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:48:05 - End Time 2025-03-18 04:48:05  
[2025-03-18 04:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705816', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705816', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705816', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705816', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:48:17] Production.INFO: ProcessCDR(1,14705816,1,1,2)  
[2025-03-18 04:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705816', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705816', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:48:20] Production.INFO: ==23980== Releasing lock...  
[2025-03-18 04:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:48:20] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:49:05
    [end_date_ymd] => 2025-03-18 04:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:49:05' and `end` < '2025-03-18 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-18 04:49:17] Production.INFO: count ==182  
[2025-03-18 04:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:49:05 - End Time 2025-03-18 04:49:05  
[2025-03-18 04:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705821', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705821', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705821', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705821', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:49:18] Production.INFO: ProcessCDR(1,14705821,1,1,2)  
[2025-03-18 04:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705821', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705821', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:49:21] Production.INFO: ==24055== Releasing lock...  
[2025-03-18 04:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:49:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 04:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:50:06
    [end_date_ymd] => 2025-03-18 04:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:50:06' and `end` < '2025-03-18 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-18 04:50:19] Production.INFO: count ==174  
[2025-03-18 04:50:19] Production.ERROR: pbx CDR StartTime 2025-03-18 01:50:06 - End Time 2025-03-18 04:50:06  
[2025-03-18 04:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705827', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705827', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705827', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705827', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:50:19] Production.INFO: ProcessCDR(1,14705827,1,1,2)  
[2025-03-18 04:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705827,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705827,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705827', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705827', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:50:22] Production.INFO: ==24129== Releasing lock...  
[2025-03-18 04:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:50:22] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:51:05
    [end_date_ymd] => 2025-03-18 04:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:51:05' and `end` < '2025-03-18 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-18 04:51:18] Production.INFO: count ==174  
[2025-03-18 04:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:51:05 - End Time 2025-03-18 04:51:05  
[2025-03-18 04:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705832', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705832', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705832', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705832', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:51:18] Production.INFO: ProcessCDR(1,14705832,1,1,2)  
[2025-03-18 04:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705832,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705832,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705832', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705832', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:51:21] Production.INFO: ==24209== Releasing lock...  
[2025-03-18 04:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:51:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:52:05
    [end_date_ymd] => 2025-03-18 04:52:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:52:05' and `end` < '2025-03-18 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-18 04:52:18] Production.INFO: count ==174  
[2025-03-18 04:52:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:52:05 - End Time 2025-03-18 04:52:05  
[2025-03-18 04:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705837', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705837', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705837', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705837', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:52:18] Production.INFO: ProcessCDR(1,14705837,1,1,2)  
[2025-03-18 04:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705837,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705837,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705837', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705837', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:52:22] Production.INFO: ==24288== Releasing lock...  
[2025-03-18 04:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:52:22] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:53:05
    [end_date_ymd] => 2025-03-18 04:53:05
    [RateCDR] => 1
)
  
[2025-03-18 04:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:53:05' and `end` < '2025-03-18 04:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 04:53:17] Production.INFO: count ==171  
[2025-03-18 04:53:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:53:05 - End Time 2025-03-18 04:53:05  
[2025-03-18 04:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705842', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705842', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705842', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705842', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:53:17] Production.INFO: ProcessCDR(1,14705842,1,1,2)  
[2025-03-18 04:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705842,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705842,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705842', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705842', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:53:21] Production.INFO: ==24381== Releasing lock...  
[2025-03-18 04:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:53:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:54:05
    [end_date_ymd] => 2025-03-18 04:54:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:54:05' and `end` < '2025-03-18 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-18 04:54:17] Production.INFO: count ==171  
[2025-03-18 04:54:17] Production.ERROR: pbx CDR StartTime 2025-03-18 01:54:05 - End Time 2025-03-18 04:54:05  
[2025-03-18 04:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705847', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705847', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705847', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705847', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:54:17] Production.INFO: ProcessCDR(1,14705847,1,1,2)  
[2025-03-18 04:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705847', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705847', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:54:21] Production.INFO: ==24493== Releasing lock...  
[2025-03-18 04:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:54:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:55:05
    [end_date_ymd] => 2025-03-18 04:55:05
    [RateCDR] => 1
)
  
[2025-03-18 04:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 01:55:05' and `end` < '2025-03-18 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-18 04:55:18] Production.INFO: count ==167  
[2025-03-18 04:55:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:55:05 - End Time 2025-03-18 04:55:05  
[2025-03-18 04:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705852', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705852', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705852', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705852', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:55:18] Production.INFO: ProcessCDR(1,14705852,1,1,2)  
[2025-03-18 04:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705852', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705852', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:55:21] Production.INFO: ==24566== Releasing lock...  
[2025-03-18 04:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:55:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-03-18 04:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:56:05
    [end_date_ymd] => 2025-03-18 04:56:05
    [RateCDR] => 1
)
  
[2025-03-18 04: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-18 01:56:05' and `end` < '2025-03-18 04: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-18 04:56:20] Production.INFO: count ==165  
[2025-03-18 04:56:20] Production.ERROR: pbx CDR StartTime 2025-03-18 01:56:05 - End Time 2025-03-18 04:56:05  
[2025-03-18 04:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705857', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705857', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705857', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705857', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:56:20] Production.INFO: ProcessCDR(1,14705857,1,1,2)  
[2025-03-18 04:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:56:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:56:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:56:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705857', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705857', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:56:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:56:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:56:23] Production.INFO: ==24639== Releasing lock...  
[2025-03-18 04:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:56:23] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:57:05
    [end_date_ymd] => 2025-03-18 04:57:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:57:05' and `end` < '2025-03-18 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-18 04:57:18] Production.INFO: count ==161  
[2025-03-18 04:57:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:57:05 - End Time 2025-03-18 04:57:05  
[2025-03-18 04:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705862', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705862', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705862', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705862', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:57:18] Production.INFO: ProcessCDR(1,14705862,1,1,2)  
[2025-03-18 04:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705862', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705862', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:57:21] Production.INFO: ==24710== Releasing lock...  
[2025-03-18 04:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:57:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 04:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:58:05
    [end_date_ymd] => 2025-03-18 04:58:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:58:05' and `end` < '2025-03-18 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-18 04:58:18] Production.INFO: count ==156  
[2025-03-18 04:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 01:58:05 - End Time 2025-03-18 04:58:05  
[2025-03-18 04:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705867', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705867', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705867', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705867', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:58:18] Production.INFO: ProcessCDR(1,14705867,1,1,2)  
[2025-03-18 04:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705867', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705867', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:58:21] Production.INFO: ==24781== Releasing lock...  
[2025-03-18 04:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:58:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 04:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 01:59:05
    [end_date_ymd] => 2025-03-18 04:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 01:59:05' and `end` < '2025-03-18 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-18 04:59:19] Production.INFO: count ==156  
[2025-03-18 04:59:19] Production.ERROR: pbx CDR StartTime 2025-03-18 01:59:05 - End Time 2025-03-18 04:59:05  
[2025-03-18 04:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 04:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705872', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705872', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705872', 'tblTempVendorCDR_20' ) start  
[2025-03-18 04:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705872', 'tblTempVendorCDR_20' ) end  
[2025-03-18 04:59:19] Production.INFO: ProcessCDR(1,14705872,1,1,2)  
[2025-03-18 04:59:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:59:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 04:59:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:59:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 04:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705872', 'tblTempUsageDetail_20' ) start  
[2025-03-18 04:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705872', 'tblTempUsageDetail_20' ) end  
[2025-03-18 04:59:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 04:59:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 04:59:23] Production.INFO: ==24854== Releasing lock...  
[2025-03-18 04:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 04:59:23] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:00:06
    [end_date_ymd] => 2025-03-18 05:00:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:00:06' and `end` < '2025-03-18 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-18 05:00:19] Production.INFO: count ==155  
[2025-03-18 05:00:19] Production.ERROR: pbx CDR StartTime 2025-03-18 02:00:06 - End Time 2025-03-18 05:00:06  
[2025-03-18 05:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705878', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705878', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705878', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705878', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:00:19] Production.INFO: ProcessCDR(1,14705878,1,1,2)  
[2025-03-18 05:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705878,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705878,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705878', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705878', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:00:22] Production.INFO: ==24931== Releasing lock...  
[2025-03-18 05:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:00:22] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:01:05
    [end_date_ymd] => 2025-03-18 05:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:01:05' and `end` < '2025-03-18 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-18 05:01:17] Production.INFO: count ==147  
[2025-03-18 05:01:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:01:05 - End Time 2025-03-18 05:01:05  
[2025-03-18 05:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705883', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705883', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705883', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705883', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:01:17] Production.INFO: ProcessCDR(1,14705883,1,1,2)  
[2025-03-18 05:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705883,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705883,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705883', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705883', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:01:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:01:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:01:20] Production.INFO: ==25017== Releasing lock...  
[2025-03-18 05:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:01:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:02:05
    [end_date_ymd] => 2025-03-18 05:02:05
    [RateCDR] => 1
)
  
[2025-03-18 05:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:02:05' and `end` < '2025-03-18 05:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:02:18] Production.INFO: count ==148  
[2025-03-18 05:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:02:05 - End Time 2025-03-18 05:02:05  
[2025-03-18 05:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705888', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705888', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705888', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705888', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:02:18] Production.INFO: ProcessCDR(1,14705888,1,1,2)  
[2025-03-18 05:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705888,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705888,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705888', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705888', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:02:21] Production.INFO: ==25088== Releasing lock...  
[2025-03-18 05:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:02:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:03:05
    [end_date_ymd] => 2025-03-18 05:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:03:05' and `end` < '2025-03-18 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-18 05:03:17] Production.INFO: count ==147  
[2025-03-18 05:03:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:03:05 - End Time 2025-03-18 05:03:05  
[2025-03-18 05:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705893', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705893', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705893', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705893', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:03:17] Production.INFO: ProcessCDR(1,14705893,1,1,2)  
[2025-03-18 05:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705893,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705893,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705893', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705893', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:03:21] Production.INFO: ==25160== Releasing lock...  
[2025-03-18 05:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:03:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:04:05
    [end_date_ymd] => 2025-03-18 05:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:04:05' and `end` < '2025-03-18 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-18 05:04:18] Production.INFO: count ==146  
[2025-03-18 05:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:04:05 - End Time 2025-03-18 05:04:05  
[2025-03-18 05:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705898', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705898', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705898', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705898', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:04:18] Production.INFO: ProcessCDR(1,14705898,1,1,2)  
[2025-03-18 05:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705898,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705898,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705898', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705898', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:04:22] Production.INFO: ==25234== Releasing lock...  
[2025-03-18 05:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:04:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:05:05
    [end_date_ymd] => 2025-03-18 05:05:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:05:05' and `end` < '2025-03-18 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-18 05:05:17] Production.INFO: count ==149  
[2025-03-18 05:05:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:05:05 - End Time 2025-03-18 05:05:05  
[2025-03-18 05:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705903', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705903', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705903', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705903', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:05:17] Production.INFO: ProcessCDR(1,14705903,1,1,2)  
[2025-03-18 05:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:05:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705903', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705903', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:05:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:05:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:05:20] Production.INFO: ==25307== Releasing lock...  
[2025-03-18 05:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:05:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:06:05
    [end_date_ymd] => 2025-03-18 05:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:06:05' and `end` < '2025-03-18 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-18 05:06:18] Production.INFO: count ==149  
[2025-03-18 05:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:06:05 - End Time 2025-03-18 05:06:05  
[2025-03-18 05:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705908', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705908', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705908', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705908', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:06:18] Production.INFO: ProcessCDR(1,14705908,1,1,2)  
[2025-03-18 05:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705908', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705908', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:06:21] Production.INFO: ==25382== Releasing lock...  
[2025-03-18 05:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:06:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:07:05
    [end_date_ymd] => 2025-03-18 05:07:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:07:05' and `end` < '2025-03-18 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-18 05:07:18] Production.INFO: count ==149  
[2025-03-18 05:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:07:05 - End Time 2025-03-18 05:07:05  
[2025-03-18 05:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705913', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705913', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705913', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705913', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:07:18] Production.INFO: ProcessCDR(1,14705913,1,1,2)  
[2025-03-18 05:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:07:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705913', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:07:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705913', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:07:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:07:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:07:21] Production.INFO: ==25455== Releasing lock...  
[2025-03-18 05:07:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:07:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:08:05
    [end_date_ymd] => 2025-03-18 05:08:05
    [RateCDR] => 1
)
  
[2025-03-18 05:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:08:05' and `end` < '2025-03-18 05:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:08:17] Production.INFO: count ==149  
[2025-03-18 05:08:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:08:05 - End Time 2025-03-18 05:08:05  
[2025-03-18 05:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705918', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705918', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705918', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705918', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:08:17] Production.INFO: ProcessCDR(1,14705918,1,1,2)  
[2025-03-18 05:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705918', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705918', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:08:21] Production.INFO: ==25531== Releasing lock...  
[2025-03-18 05:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:08:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:09:05
    [end_date_ymd] => 2025-03-18 05:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:09:05' and `end` < '2025-03-18 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-18 05:09:17] Production.INFO: count ==149  
[2025-03-18 05:09:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:09:05 - End Time 2025-03-18 05:09:05  
[2025-03-18 05:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705923', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705923', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705923', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705923', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:09:17] Production.INFO: ProcessCDR(1,14705923,1,1,2)  
[2025-03-18 05:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705923', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705923', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:09:21] Production.INFO: ==25645== Releasing lock...  
[2025-03-18 05:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:09:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:10:07
    [end_date_ymd] => 2025-03-18 05:10:07
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:10:07' and `end` < '2025-03-18 05: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-18 05:10:19] Production.INFO: count ==146  
[2025-03-18 05:10:19] Production.ERROR: pbx CDR StartTime 2025-03-18 02:10:07 - End Time 2025-03-18 05:10:07  
[2025-03-18 05:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705929', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705929', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705929', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705929', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:10:19] Production.INFO: ProcessCDR(1,14705929,1,1,2)  
[2025-03-18 05:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705929,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705929,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705929', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705929', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:10:22] Production.INFO: ==25724== Releasing lock...  
[2025-03-18 05:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:10:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:11:05
    [end_date_ymd] => 2025-03-18 05:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:11:05' and `end` < '2025-03-18 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-18 05:11:17] Production.INFO: count ==146  
[2025-03-18 05:11:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:11:05 - End Time 2025-03-18 05:11:05  
[2025-03-18 05:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705934', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705934', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705934', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705934', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:11:17] Production.INFO: ProcessCDR(1,14705934,1,1,2)  
[2025-03-18 05:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705934,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705934,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705934', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705934', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:11:21] Production.INFO: ==25800== Releasing lock...  
[2025-03-18 05:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:11:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:12:05
    [end_date_ymd] => 2025-03-18 05:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:12:05' and `end` < '2025-03-18 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-18 05:12:17] Production.INFO: count ==146  
[2025-03-18 05:12:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:12:05 - End Time 2025-03-18 05:12:05  
[2025-03-18 05:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705939', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705939', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705939', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705939', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:12:17] Production.INFO: ProcessCDR(1,14705939,1,1,2)  
[2025-03-18 05:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705939,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705939,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705939', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705939', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:12:20] Production.INFO: ==25875== Releasing lock...  
[2025-03-18 05:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:12:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:13:05
    [end_date_ymd] => 2025-03-18 05:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:13:05' and `end` < '2025-03-18 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-18 05:13:17] Production.INFO: count ==149  
[2025-03-18 05:13:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:13:05 - End Time 2025-03-18 05:13:05  
[2025-03-18 05:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705944', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705944', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705944', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705944', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:13:17] Production.INFO: ProcessCDR(1,14705944,1,1,2)  
[2025-03-18 05:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705944,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705944,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705944', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705944', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:13:21] Production.INFO: ==25948== Releasing lock...  
[2025-03-18 05:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:13:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:14:05
    [end_date_ymd] => 2025-03-18 05:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:14:05' and `end` < '2025-03-18 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-18 05:14:17] Production.INFO: count ==149  
[2025-03-18 05:14:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:14:05 - End Time 2025-03-18 05:14:05  
[2025-03-18 05:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705949', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705949', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705949', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705949', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:14:17] Production.INFO: ProcessCDR(1,14705949,1,1,2)  
[2025-03-18 05:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705949', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705949', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:14:21] Production.INFO: ==26018== Releasing lock...  
[2025-03-18 05:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:14:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:15:05
    [end_date_ymd] => 2025-03-18 05:15:05
    [RateCDR] => 1
)
  
[2025-03-18 05:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:15:05' and `end` < '2025-03-18 05:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:15:17] Production.INFO: count ==149  
[2025-03-18 05:15:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:15:05 - End Time 2025-03-18 05:15:05  
[2025-03-18 05:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705953', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705953', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705953', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705953', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:15:17] Production.INFO: ProcessCDR(1,14705953,1,1,2)  
[2025-03-18 05:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705953', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705953', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:15:21] Production.INFO: ==26095== Releasing lock...  
[2025-03-18 05:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:15:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:16:05
    [end_date_ymd] => 2025-03-18 05:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:16:05' and `end` < '2025-03-18 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-18 05:16:17] Production.INFO: count ==145  
[2025-03-18 05:16:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:16:05 - End Time 2025-03-18 05:16:05  
[2025-03-18 05:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705959', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705959', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705959', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705959', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:16:17] Production.INFO: ProcessCDR(1,14705959,1,1,2)  
[2025-03-18 05:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705959', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705959', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:16:20] Production.INFO: ==26172== Releasing lock...  
[2025-03-18 05:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:16:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:17:06
    [end_date_ymd] => 2025-03-18 05:17:06
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:17:06' and `end` < '2025-03-18 05: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-18 05:17:18] Production.INFO: count ==141  
[2025-03-18 05:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:17:06 - End Time 2025-03-18 05:17:06  
[2025-03-18 05:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705964', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705964', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705964', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705964', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:17:18] Production.INFO: ProcessCDR(1,14705964,1,1,2)  
[2025-03-18 05:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705964', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705964', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:17:21] Production.INFO: ==26249== Releasing lock...  
[2025-03-18 05:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:17:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:18:05
    [end_date_ymd] => 2025-03-18 05:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:18:05' and `end` < '2025-03-18 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-18 05:18:17] Production.INFO: count ==134  
[2025-03-18 05:18:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:18:05 - End Time 2025-03-18 05:18:05  
[2025-03-18 05:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705969', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705969', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705969', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705969', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:18:17] Production.INFO: ProcessCDR(1,14705969,1,1,2)  
[2025-03-18 05:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:18:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705969', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705969', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:18:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:18:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:18:20] Production.INFO: ==26337== Releasing lock...  
[2025-03-18 05:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:18:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:19:05
    [end_date_ymd] => 2025-03-18 05:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:19:05' and `end` < '2025-03-18 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-18 05:19:18] Production.INFO: count ==134  
[2025-03-18 05:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:19:05 - End Time 2025-03-18 05:19:05  
[2025-03-18 05:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705974', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705974', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705974', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705974', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:19:18] Production.INFO: ProcessCDR(1,14705974,1,1,2)  
[2025-03-18 05:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705974', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705974', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:19:21] Production.INFO: ==26416== Releasing lock...  
[2025-03-18 05:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:19:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:20:06
    [end_date_ymd] => 2025-03-18 05:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:20:06' and `end` < '2025-03-18 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-18 05:20:18] Production.INFO: count ==134  
[2025-03-18 05:20:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:20:06 - End Time 2025-03-18 05:20:06  
[2025-03-18 05:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705979', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705979', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705979', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705979', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:20:18] Production.INFO: ProcessCDR(1,14705979,1,1,2)  
[2025-03-18 05:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705979', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705979', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:20:21] Production.INFO: ==26501== Releasing lock...  
[2025-03-18 05:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:20:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:21:06
    [end_date_ymd] => 2025-03-18 05:21:06
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:21:06' and `end` < '2025-03-18 05: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-18 05:21:18] Production.INFO: count ==134  
[2025-03-18 05:21:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:21:06 - End Time 2025-03-18 05:21:06  
[2025-03-18 05:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705985', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705985', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705985', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705985', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:21:18] Production.INFO: ProcessCDR(1,14705985,1,1,2)  
[2025-03-18 05:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705985,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705985,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705985', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705985', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:21:21] Production.INFO: ==26579== Releasing lock...  
[2025-03-18 05:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:21:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:22:05
    [end_date_ymd] => 2025-03-18 05:22:05
    [RateCDR] => 1
)
  
[2025-03-18 05:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:22:05' and `end` < '2025-03-18 05:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:22:17] Production.INFO: count ==130  
[2025-03-18 05:22:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:22:05 - End Time 2025-03-18 05:22:05  
[2025-03-18 05:22:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705990', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705990', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705990', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:22:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705990', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:22:17] Production.INFO: ProcessCDR(1,14705990,1,1,2)  
[2025-03-18 05:22:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705990,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:22:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705990,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705990', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:22:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705990', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:22:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:22:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:22:20] Production.INFO: ==26656== Releasing lock...  
[2025-03-18 05:22:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:22:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:23:05
    [end_date_ymd] => 2025-03-18 05:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:23:05' and `end` < '2025-03-18 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-18 05:23:17] Production.INFO: count ==130  
[2025-03-18 05:23:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:23:05 - End Time 2025-03-18 05:23:05  
[2025-03-18 05:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705995', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14705995', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705995', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14705995', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:23:17] Production.INFO: ProcessCDR(1,14705995,1,1,2)  
[2025-03-18 05:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14705995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:23:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14705995,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:23:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14705995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14705995,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705995', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14705995', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:23:21] Production.INFO: ==26734== Releasing lock...  
[2025-03-18 05:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:23:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:24:06
    [end_date_ymd] => 2025-03-18 05:24:06
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:24:06' and `end` < '2025-03-18 05: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-18 05:24:18] Production.INFO: count ==126  
[2025-03-18 05:24:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:24:06 - End Time 2025-03-18 05:24:06  
[2025-03-18 05:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706000', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706000', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706000', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706000', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:24:18] Production.INFO: ProcessCDR(1,14706000,1,1,2)  
[2025-03-18 05:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706000,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706000,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706000', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706000', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:24:21] Production.INFO: ==26808== Releasing lock...  
[2025-03-18 05:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:24:21] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 05:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:25:05
    [end_date_ymd] => 2025-03-18 05:25:05
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:25:05' and `end` < '2025-03-18 05: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-18 05:25:18] Production.INFO: count ==118  
[2025-03-18 05:25:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:25:05 - End Time 2025-03-18 05:25:05  
[2025-03-18 05:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706005', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706005', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706005', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706005', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:25:18] Production.INFO: ProcessCDR(1,14706005,1,1,2)  
[2025-03-18 05:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706005', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706005', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:25:21] Production.INFO: ==26925== Releasing lock...  
[2025-03-18 05:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:25:21] Production.INFO: 29 MB  #Memory Used#   
[2025-03-18 05:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:26:05
    [end_date_ymd] => 2025-03-18 05:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:26:05' and `end` < '2025-03-18 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-18 05:26:17] Production.INFO: count ==112  
[2025-03-18 05:26:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:26:05 - End Time 2025-03-18 05:26:05  
[2025-03-18 05:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706010', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706010', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706010', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706010', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:26:17] Production.INFO: ProcessCDR(1,14706010,1,1,2)  
[2025-03-18 05:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:26:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706010', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706010', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:26:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:26:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:26:20] Production.INFO: ==27001== Releasing lock...  
[2025-03-18 05:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:26:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 05:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:27:05
    [end_date_ymd] => 2025-03-18 05:27:05
    [RateCDR] => 1
)
  
[2025-03-18 05:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:27:05' and `end` < '2025-03-18 05:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:27:17] Production.INFO: count ==105  
[2025-03-18 05:27:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:27:05 - End Time 2025-03-18 05:27:05  
[2025-03-18 05:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706015', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706015', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706015', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706015', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:27:17] Production.INFO: ProcessCDR(1,14706015,1,1,2)  
[2025-03-18 05:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706015', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706015', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:27:21] Production.INFO: ==27075== Releasing lock...  
[2025-03-18 05:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:27:21] Production.INFO: 29 MB  #Memory Used#   
[2025-03-18 05:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:28:05
    [end_date_ymd] => 2025-03-18 05:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:28:05' and `end` < '2025-03-18 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-18 05:28:17] Production.INFO: count ==105  
[2025-03-18 05:28:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:28:05 - End Time 2025-03-18 05:28:05  
[2025-03-18 05:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706020', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706020', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706020', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706020', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:28:17] Production.INFO: ProcessCDR(1,14706020,1,1,2)  
[2025-03-18 05:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706020', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706020', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:28:21] Production.INFO: ==27153== Releasing lock...  
[2025-03-18 05:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:28:21] Production.INFO: 29 MB  #Memory Used#   
[2025-03-18 05:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:29:05
    [end_date_ymd] => 2025-03-18 05:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:29:05' and `end` < '2025-03-18 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-18 05:29:17] Production.INFO: count ==105  
[2025-03-18 05:29:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:29:05 - End Time 2025-03-18 05:29:05  
[2025-03-18 05:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706025', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706025', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706025', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706025', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:29:17] Production.INFO: ProcessCDR(1,14706025,1,1,2)  
[2025-03-18 05:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:29:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706025', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:29:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706025', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:29:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:29:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:29:20] Production.INFO: ==27231== Releasing lock...  
[2025-03-18 05:29:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:29:20] Production.INFO: 29 MB  #Memory Used#   
[2025-03-18 05:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:30:06
    [end_date_ymd] => 2025-03-18 05:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:30:06' and `end` < '2025-03-18 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-18 05:30:18] Production.INFO: count ==103  
[2025-03-18 05:30:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:30:06 - End Time 2025-03-18 05:30:06  
[2025-03-18 05:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706031', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706031', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706031', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706031', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:30:18] Production.INFO: ProcessCDR(1,14706031,1,1,2)  
[2025-03-18 05:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706031,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706031,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706031', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706031', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:30:21] Production.INFO: ==27317== Releasing lock...  
[2025-03-18 05:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:30:21] Production.INFO: 29 MB  #Memory Used#   
[2025-03-18 05:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:31:05
    [end_date_ymd] => 2025-03-18 05:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:31:05' and `end` < '2025-03-18 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-18 05:31:17] Production.INFO: count ==103  
[2025-03-18 05:31:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:31:05 - End Time 2025-03-18 05:31:05  
[2025-03-18 05:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706036', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706036', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706036', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706036', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:31:17] Production.INFO: ProcessCDR(1,14706036,1,1,2)  
[2025-03-18 05:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706036,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:31:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706036,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706036', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:31:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706036', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:31:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:31:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:31:20] Production.INFO: ==27393== Releasing lock...  
[2025-03-18 05:31:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:31:20] Production.INFO: 29 MB  #Memory Used#   
[2025-03-18 05:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:32:05
    [end_date_ymd] => 2025-03-18 05:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:32:05' and `end` < '2025-03-18 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-18 05:32:17] Production.INFO: count ==99  
[2025-03-18 05:32:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:32:05 - End Time 2025-03-18 05:32:05  
[2025-03-18 05:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706041', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706041', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706041', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706041', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:32:17] Production.INFO: ProcessCDR(1,14706041,1,1,2)  
[2025-03-18 05:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706041,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706041,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706041,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706041,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706041', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706041', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:32:21] Production.INFO: ==27470== Releasing lock...  
[2025-03-18 05:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:32:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 05:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:33:05
    [end_date_ymd] => 2025-03-18 05:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:33:05' and `end` < '2025-03-18 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-18 05:33:17] Production.INFO: count ==93  
[2025-03-18 05:33:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:33:05 - End Time 2025-03-18 05:33:05  
[2025-03-18 05:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706046', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706046', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706046', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706046', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:33:17] Production.INFO: ProcessCDR(1,14706046,1,1,2)  
[2025-03-18 05:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706046,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706046,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706046', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706046', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:33:20] Production.INFO: ==27548== Releasing lock...  
[2025-03-18 05:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:33:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:34:05
    [end_date_ymd] => 2025-03-18 05:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:34:05' and `end` < '2025-03-18 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-18 05:34:17] Production.INFO: count ==93  
[2025-03-18 05:34:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:34:05 - End Time 2025-03-18 05:34:05  
[2025-03-18 05:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706051', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706051', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706051', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706051', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:34:17] Production.INFO: ProcessCDR(1,14706051,1,1,2)  
[2025-03-18 05:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706051,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:34:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706051,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706051', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706051', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:34:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:34:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:34:20] Production.INFO: ==27626== Releasing lock...  
[2025-03-18 05:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:34:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:35:05
    [end_date_ymd] => 2025-03-18 05:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:35:05' and `end` < '2025-03-18 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-18 05:35:17] Production.INFO: count ==93  
[2025-03-18 05:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:35:05 - End Time 2025-03-18 05:35:05  
[2025-03-18 05:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706056', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706056', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706056', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706056', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:35:17] Production.INFO: ProcessCDR(1,14706056,1,1,2)  
[2025-03-18 05:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706056', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706056', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:35:20] Production.INFO: ==27704== Releasing lock...  
[2025-03-18 05:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:35:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:36:05
    [end_date_ymd] => 2025-03-18 05:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:36:05' and `end` < '2025-03-18 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-18 05:36:17] Production.INFO: count ==92  
[2025-03-18 05:36:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:36:05 - End Time 2025-03-18 05:36:05  
[2025-03-18 05:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706061', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706061', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706061', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706061', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:36:18] Production.INFO: ProcessCDR(1,14706061,1,1,2)  
[2025-03-18 05:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706061', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706061', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:36:21] Production.INFO: ==27784== Releasing lock...  
[2025-03-18 05:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:36:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:37:05
    [end_date_ymd] => 2025-03-18 05:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:37:05' and `end` < '2025-03-18 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-18 05:37:17] Production.INFO: count ==92  
[2025-03-18 05:37:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:37:05 - End Time 2025-03-18 05:37:05  
[2025-03-18 05:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706066', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706066', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706066', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706066', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:37:17] Production.INFO: ProcessCDR(1,14706066,1,1,2)  
[2025-03-18 05:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:37:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:37:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:37:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706066', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:37:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706066', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:37:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:37:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:37:20] Production.INFO: ==27857== Releasing lock...  
[2025-03-18 05:37:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:37:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:38:06
    [end_date_ymd] => 2025-03-18 05:38:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:38:06' and `end` < '2025-03-18 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-18 05:38:18] Production.INFO: count ==92  
[2025-03-18 05:38:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:38:06 - End Time 2025-03-18 05:38:06  
[2025-03-18 05:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706071', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706071', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706071', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706071', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:38:18] Production.INFO: ProcessCDR(1,14706071,1,1,2)  
[2025-03-18 05:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706071', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706071', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:38:21] Production.INFO: ==27935== Releasing lock...  
[2025-03-18 05:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:38:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:39:05
    [end_date_ymd] => 2025-03-18 05:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:39:05' and `end` < '2025-03-18 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-18 05:39:17] Production.INFO: count ==92  
[2025-03-18 05:39:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:39:05 - End Time 2025-03-18 05:39:05  
[2025-03-18 05:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706076', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706076', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706076', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706076', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:39:18] Production.INFO: ProcessCDR(1,14706076,1,1,2)  
[2025-03-18 05:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706076', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706076', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:39:21] Production.INFO: ==28011== Releasing lock...  
[2025-03-18 05:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:39:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:40:06
    [end_date_ymd] => 2025-03-18 05:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:40:06' and `end` < '2025-03-18 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-18 05:40:18] Production.INFO: count ==90  
[2025-03-18 05:40:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:40:06 - End Time 2025-03-18 05:40:06  
[2025-03-18 05:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706082', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706082', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706082', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706082', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:40:18] Production.INFO: ProcessCDR(1,14706082,1,1,2)  
[2025-03-18 05:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706082,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706082,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706082', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706082', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:40:21] Production.INFO: ==28126== Releasing lock...  
[2025-03-18 05:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:40:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:41:05
    [end_date_ymd] => 2025-03-18 05:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:41:05' and `end` < '2025-03-18 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-18 05:41:17] Production.INFO: count ==90  
[2025-03-18 05:41:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:41:05 - End Time 2025-03-18 05:41:05  
[2025-03-18 05:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706087', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706087', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706087', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706087', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:41:17] Production.INFO: ProcessCDR(1,14706087,1,1,2)  
[2025-03-18 05:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706087,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706087,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706087,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706087,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706087', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706087', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:41:21] Production.INFO: ==28205== Releasing lock...  
[2025-03-18 05:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:41:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:42:05
    [end_date_ymd] => 2025-03-18 05:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:42:05' and `end` < '2025-03-18 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-18 05:42:17] Production.INFO: count ==90  
[2025-03-18 05:42:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:42:05 - End Time 2025-03-18 05:42:05  
[2025-03-18 05:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706092', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706092', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706092', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706092', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:42:17] Production.INFO: ProcessCDR(1,14706092,1,1,2)  
[2025-03-18 05:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706092,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706092,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706092,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706092,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706092', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706092', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:42:21] Production.INFO: ==28283== Releasing lock...  
[2025-03-18 05:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:42:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:43:05
    [end_date_ymd] => 2025-03-18 05:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:43:05' and `end` < '2025-03-18 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-18 05:43:17] Production.INFO: count ==93  
[2025-03-18 05:43:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:43:05 - End Time 2025-03-18 05:43:05  
[2025-03-18 05:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706097', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706097', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706097', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706097', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:43:18] Production.INFO: ProcessCDR(1,14706097,1,1,2)  
[2025-03-18 05:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706097,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706097,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706097', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706097', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:43:21] Production.INFO: ==28359== Releasing lock...  
[2025-03-18 05:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:43:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:44:05
    [end_date_ymd] => 2025-03-18 05:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:44:05' and `end` < '2025-03-18 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-18 05:44:17] Production.INFO: count ==93  
[2025-03-18 05:44:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:44:05 - End Time 2025-03-18 05:44:05  
[2025-03-18 05:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706102', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706102', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706102', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706102', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:44:17] Production.INFO: ProcessCDR(1,14706102,1,1,2)  
[2025-03-18 05:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:44:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706102', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:44:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706102', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:44:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:44:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:44:20] Production.INFO: ==28433== Releasing lock...  
[2025-03-18 05:44:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:44:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 05:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:45:06
    [end_date_ymd] => 2025-03-18 05:45:06
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:45:06' and `end` < '2025-03-18 05: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-18 05:45:18] Production.INFO: count ==85  
[2025-03-18 05:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:45:06 - End Time 2025-03-18 05:45:06  
[2025-03-18 05:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706107', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706107', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706107', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706107', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:45:18] Production.INFO: ProcessCDR(1,14706107,1,1,2)  
[2025-03-18 05:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706107', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706107', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:45:21] Production.INFO: ==28508== Releasing lock...  
[2025-03-18 05:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:45:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 05:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:46:05
    [end_date_ymd] => 2025-03-18 05:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:46:05' and `end` < '2025-03-18 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-18 05:46:18] Production.INFO: count ==75  
[2025-03-18 05:46:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:46:05 - End Time 2025-03-18 05:46:05  
[2025-03-18 05:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706112', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706112', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706112', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706112', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:46:18] Production.INFO: ProcessCDR(1,14706112,1,1,2)  
[2025-03-18 05:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706112,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706112,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706112,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706112,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706112', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706112', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:46:21] Production.INFO: ==28584== Releasing lock...  
[2025-03-18 05:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:46:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 05:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:47:06
    [end_date_ymd] => 2025-03-18 05:47:06
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:47:06' and `end` < '2025-03-18 05: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-18 05:47:18] Production.INFO: count ==68  
[2025-03-18 05:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:47:06 - End Time 2025-03-18 05:47:06  
[2025-03-18 05:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706117', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706117', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706117', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706117', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:47:18] Production.INFO: ProcessCDR(1,14706117,1,1,2)  
[2025-03-18 05:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706117', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706117', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:47:21] Production.INFO: ==28660== Releasing lock...  
[2025-03-18 05:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:47:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:48:05
    [end_date_ymd] => 2025-03-18 05:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:48:05' and `end` < '2025-03-18 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-18 05:48:17] Production.INFO: count ==68  
[2025-03-18 05:48:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:48:05 - End Time 2025-03-18 05:48:05  
[2025-03-18 05:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706122', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706122', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706122', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706122', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:48:17] Production.INFO: ProcessCDR(1,14706122,1,1,2)  
[2025-03-18 05:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706122,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706122,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706122,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706122,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706122', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706122', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:48:20] Production.INFO: ==28735== Releasing lock...  
[2025-03-18 05:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:48:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:49:05
    [end_date_ymd] => 2025-03-18 05:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:49:05' and `end` < '2025-03-18 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-18 05:49:17] Production.INFO: count ==64  
[2025-03-18 05:49:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:49:05 - End Time 2025-03-18 05:49:05  
[2025-03-18 05:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706127', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706127', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706127', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706127', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:49:17] Production.INFO: ProcessCDR(1,14706127,1,1,2)  
[2025-03-18 05:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706127,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706127,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706127,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706127,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706127', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706127', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:49:21] Production.INFO: ==28816== Releasing lock...  
[2025-03-18 05:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:49:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:50:06
    [end_date_ymd] => 2025-03-18 05:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:50:06' and `end` < '2025-03-18 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-18 05:50:18] Production.INFO: count ==64  
[2025-03-18 05:50:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:50:06 - End Time 2025-03-18 05:50:06  
[2025-03-18 05:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706132', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706132', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706132', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706132', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:50:18] Production.INFO: ProcessCDR(1,14706132,1,1,2)  
[2025-03-18 05:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706132', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706132', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:50:21] Production.INFO: ==28894== Releasing lock...  
[2025-03-18 05:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:50:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:51:06
    [end_date_ymd] => 2025-03-18 05:51:06
    [RateCDR] => 1
)
  
[2025-03-18 05:51:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:51:06' and `end` < '2025-03-18 05:51:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:51:18] Production.INFO: count ==64  
[2025-03-18 05:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:51:06 - End Time 2025-03-18 05:51:06  
[2025-03-18 05:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706138', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706138', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706138', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706138', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:51:18] Production.INFO: ProcessCDR(1,14706138,1,1,2)  
[2025-03-18 05:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706138,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706138,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706138,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:51:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706138,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706138', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706138', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:51:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:51:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:51:22] Production.INFO: ==28970== Releasing lock...  
[2025-03-18 05:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:51:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:52:05
    [end_date_ymd] => 2025-03-18 05:52:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:52:05' and `end` < '2025-03-18 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-18 05:52:17] Production.INFO: count ==64  
[2025-03-18 05:52:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:52:05 - End Time 2025-03-18 05:52:05  
[2025-03-18 05:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706143', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706143', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706143', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706143', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:52:17] Production.INFO: ProcessCDR(1,14706143,1,1,2)  
[2025-03-18 05:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706143,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706143,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706143', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706143', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:52:21] Production.INFO: ==29047== Releasing lock...  
[2025-03-18 05:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:52:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:53:05
    [end_date_ymd] => 2025-03-18 05:53:05
    [RateCDR] => 1
)
  
[2025-03-18 05:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:53:05' and `end` < '2025-03-18 05:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:53:17] Production.INFO: count ==64  
[2025-03-18 05:53:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:53:05 - End Time 2025-03-18 05:53:05  
[2025-03-18 05:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706148', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706148', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706148', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706148', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:53:17] Production.INFO: ProcessCDR(1,14706148,1,1,2)  
[2025-03-18 05:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706148,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:53:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706148,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706148', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706148', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:53:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:53:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:53:20] Production.INFO: ==29119== Releasing lock...  
[2025-03-18 05:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:53:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:54:05
    [end_date_ymd] => 2025-03-18 05:54:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:54:05' and `end` < '2025-03-18 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-18 05:54:17] Production.INFO: count ==64  
[2025-03-18 05:54:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:54:05 - End Time 2025-03-18 05:54:05  
[2025-03-18 05:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706153', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706153', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706153', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706153', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:54:17] Production.INFO: ProcessCDR(1,14706153,1,1,2)  
[2025-03-18 05:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706153', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706153', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:54:21] Production.INFO: ==29194== Releasing lock...  
[2025-03-18 05:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:54:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:55:06
    [end_date_ymd] => 2025-03-18 05:55:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:55:06' and `end` < '2025-03-18 05: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-18 05:55:18] Production.INFO: count ==61  
[2025-03-18 05:55:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:55:06 - End Time 2025-03-18 05:55:06  
[2025-03-18 05:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706158', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706158', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706158', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706158', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:55:18] Production.INFO: ProcessCDR(1,14706158,1,1,2)  
[2025-03-18 05:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706158', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706158', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:55:21] Production.INFO: ==29305== Releasing lock...  
[2025-03-18 05:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:55:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:56:06
    [end_date_ymd] => 2025-03-18 05:56:06
    [RateCDR] => 1
)
  
[2025-03-18 05: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-18 02:56:06' and `end` < '2025-03-18 05: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-18 05:56:18] Production.INFO: count ==61  
[2025-03-18 05:56:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:56:06 - End Time 2025-03-18 05:56:06  
[2025-03-18 05:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706163', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706163', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706163', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706163', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:56:18] Production.INFO: ProcessCDR(1,14706163,1,1,2)  
[2025-03-18 05:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706163', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706163', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:56:21] Production.INFO: ==29378== Releasing lock...  
[2025-03-18 05:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:56:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 05:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:57:05
    [end_date_ymd] => 2025-03-18 05:57:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:57:05' and `end` < '2025-03-18 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-18 05:57:17] Production.INFO: count ==56  
[2025-03-18 05:57:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:57:05 - End Time 2025-03-18 05:57:05  
[2025-03-18 05:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706168', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706168', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706168', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706168', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:57:17] Production.INFO: ProcessCDR(1,14706168,1,1,2)  
[2025-03-18 05:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706168', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706168', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:57:21] Production.INFO: ==29450== Releasing lock...  
[2025-03-18 05:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:57:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 05:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:58:05
    [end_date_ymd] => 2025-03-18 05:58:05
    [RateCDR] => 1
)
  
[2025-03-18 05:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 02:58:05' and `end` < '2025-03-18 05:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 05:58:17] Production.INFO: count ==56  
[2025-03-18 05:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 02:58:05 - End Time 2025-03-18 05:58:05  
[2025-03-18 05:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706173', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706173', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706173', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706173', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:58:18] Production.INFO: ProcessCDR(1,14706173,1,1,2)  
[2025-03-18 05:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706173', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706173', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:58:21] Production.INFO: ==29524== Releasing lock...  
[2025-03-18 05:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:58:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 05:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 02:59:05
    [end_date_ymd] => 2025-03-18 05:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 02:59:05' and `end` < '2025-03-18 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-18 05:59:17] Production.INFO: count ==55  
[2025-03-18 05:59:17] Production.ERROR: pbx CDR StartTime 2025-03-18 02:59:05 - End Time 2025-03-18 05:59:05  
[2025-03-18 05:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706178', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706178', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706178', 'tblTempVendorCDR_20' ) start  
[2025-03-18 05:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706178', 'tblTempVendorCDR_20' ) end  
[2025-03-18 05:59:17] Production.INFO: ProcessCDR(1,14706178,1,1,2)  
[2025-03-18 05:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 05:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 05:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706178', 'tblTempUsageDetail_20' ) start  
[2025-03-18 05:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706178', 'tblTempUsageDetail_20' ) end  
[2025-03-18 05:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 05:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 05:59:21] Production.INFO: ==29599== Releasing lock...  
[2025-03-18 05:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 05:59:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:00:06
    [end_date_ymd] => 2025-03-18 06:00:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:00:06' and `end` < '2025-03-18 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-18 06:00:18] Production.INFO: count ==63  
[2025-03-18 06:00:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:00:06 - End Time 2025-03-18 06:00:06  
[2025-03-18 06:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706183', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706183', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706183', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706183', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:00:18] Production.INFO: ProcessCDR(1,14706183,1,1,2)  
[2025-03-18 06:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706183', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706183', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:00:22] Production.INFO: ==29678== Releasing lock...  
[2025-03-18 06:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:00:22] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:01:05
    [end_date_ymd] => 2025-03-18 06:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:01:05' and `end` < '2025-03-18 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-18 06:01:17] Production.INFO: count ==64  
[2025-03-18 06:01:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:01:05 - End Time 2025-03-18 06:01:05  
[2025-03-18 06:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706189', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706189', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706189', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706189', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:01:17] Production.INFO: ProcessCDR(1,14706189,1,1,2)  
[2025-03-18 06:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706189,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706189,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706189', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706189', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:01:21] Production.INFO: ==29771== Releasing lock...  
[2025-03-18 06:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:01:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:02:05
    [end_date_ymd] => 2025-03-18 06:02:05
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:02:05' and `end` < '2025-03-18 06: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-18 06:02:17] Production.INFO: count ==63  
[2025-03-18 06:02:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:02:05 - End Time 2025-03-18 06:02:05  
[2025-03-18 06:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706194', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706194', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706194', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706194', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:02:17] Production.INFO: ProcessCDR(1,14706194,1,1,2)  
[2025-03-18 06:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706194,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706194,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706194,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706194,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706194', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706194', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:02:21] Production.INFO: ==29846== Releasing lock...  
[2025-03-18 06:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:02:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:03:05
    [end_date_ymd] => 2025-03-18 06:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:03:05' and `end` < '2025-03-18 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-18 06:03:18] Production.INFO: count ==63  
[2025-03-18 06:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:03:05 - End Time 2025-03-18 06:03:05  
[2025-03-18 06:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706199', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706199', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706199', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706199', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:03:18] Production.INFO: ProcessCDR(1,14706199,1,1,2)  
[2025-03-18 06:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706199,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:03:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706199,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706199', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:03:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706199', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:03:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:03:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:03:21] Production.INFO: ==29919== Releasing lock...  
[2025-03-18 06:03:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:03:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:04:05
    [end_date_ymd] => 2025-03-18 06:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:04:05' and `end` < '2025-03-18 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-18 06:04:18] Production.INFO: count ==63  
[2025-03-18 06:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:04:05 - End Time 2025-03-18 06:04:05  
[2025-03-18 06:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706204', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706204', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706204', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706204', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:04:18] Production.INFO: ProcessCDR(1,14706204,1,1,2)  
[2025-03-18 06:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706204', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706204', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:04:21] Production.INFO: ==29995== Releasing lock...  
[2025-03-18 06:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:04:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:05:06
    [end_date_ymd] => 2025-03-18 06:05:06
    [RateCDR] => 1
)
  
[2025-03-18 06:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:05:06' and `end` < '2025-03-18 06:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:05:18] Production.INFO: count ==63  
[2025-03-18 06:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:05:06 - End Time 2025-03-18 06:05:06  
[2025-03-18 06:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706209', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706209', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706209', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706209', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:05:18] Production.INFO: ProcessCDR(1,14706209,1,1,2)  
[2025-03-18 06:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706209', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706209', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:05:21] Production.INFO: ==30079== Releasing lock...  
[2025-03-18 06:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:05:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:06:05
    [end_date_ymd] => 2025-03-18 06:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:06:05' and `end` < '2025-03-18 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-18 06:06:17] Production.INFO: count ==63  
[2025-03-18 06:06:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:06:05 - End Time 2025-03-18 06:06:05  
[2025-03-18 06:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706214', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706214', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706214', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706214', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:06:18] Production.INFO: ProcessCDR(1,14706214,1,1,2)  
[2025-03-18 06:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706214', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706214', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:06:21] Production.INFO: ==30156== Releasing lock...  
[2025-03-18 06:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:06:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:07:06
    [end_date_ymd] => 2025-03-18 06:07:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:07:06' and `end` < '2025-03-18 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-18 06:07:18] Production.INFO: count ==63  
[2025-03-18 06:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:07:06 - End Time 2025-03-18 06:07:06  
[2025-03-18 06:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706219', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706219', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706219', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706219', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:07:18] Production.INFO: ProcessCDR(1,14706219,1,1,2)  
[2025-03-18 06:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706219', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706219', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:07:22] Production.INFO: ==30235== Releasing lock...  
[2025-03-18 06:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:07:22] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:08:05
    [end_date_ymd] => 2025-03-18 06:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:08:05' and `end` < '2025-03-18 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-18 06:08:17] Production.INFO: count ==63  
[2025-03-18 06:08:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:08:05 - End Time 2025-03-18 06:08:05  
[2025-03-18 06:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706224', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706224', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706224', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706224', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:08:17] Production.INFO: ProcessCDR(1,14706224,1,1,2)  
[2025-03-18 06:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706224,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706224,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706224,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706224,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706224', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706224', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:08:21] Production.INFO: ==30322== Releasing lock...  
[2025-03-18 06:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:08:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:09:05
    [end_date_ymd] => 2025-03-18 06:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:09:05' and `end` < '2025-03-18 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-18 06:09:17] Production.INFO: count ==63  
[2025-03-18 06:09:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:09:05 - End Time 2025-03-18 06:09:05  
[2025-03-18 06:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706229', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706229', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706229', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706229', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:09:18] Production.INFO: ProcessCDR(1,14706229,1,1,2)  
[2025-03-18 06:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706229', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706229', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:09:21] Production.INFO: ==30405== Releasing lock...  
[2025-03-18 06:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:09:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:10:06
    [end_date_ymd] => 2025-03-18 06:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:10:06' and `end` < '2025-03-18 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-18 06:10:18] Production.INFO: count ==63  
[2025-03-18 06:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:10:06 - End Time 2025-03-18 06:10:06  
[2025-03-18 06:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706235', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706235', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706235', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706235', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:10:18] Production.INFO: ProcessCDR(1,14706235,1,1,2)  
[2025-03-18 06:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:10:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706235,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:10:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706235,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706235', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706235', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:10:22] Production.INFO: ==30486== Releasing lock...  
[2025-03-18 06:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:10:22] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:11:06
    [end_date_ymd] => 2025-03-18 06:11:06
    [RateCDR] => 1
)
  
[2025-03-18 06:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:11:06' and `end` < '2025-03-18 06:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:11:18] Production.INFO: count ==63  
[2025-03-18 06:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:11:06 - End Time 2025-03-18 06:11:06  
[2025-03-18 06:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706240', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706240', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706240', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706240', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:11:18] Production.INFO: ProcessCDR(1,14706240,1,1,2)  
[2025-03-18 06:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706240,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706240,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706240', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706240', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:11:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:11:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:11:21] Production.INFO: ==30613== Releasing lock...  
[2025-03-18 06:11:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:11:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:12:05
    [end_date_ymd] => 2025-03-18 06:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:12:05' and `end` < '2025-03-18 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-18 06:12:17] Production.INFO: count ==63  
[2025-03-18 06:12:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:12:05 - End Time 2025-03-18 06:12:05  
[2025-03-18 06:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706245', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706245', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706245', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706245', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:12:17] Production.INFO: ProcessCDR(1,14706245,1,1,2)  
[2025-03-18 06:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706245,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:12:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706245,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706245', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:12:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706245', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:12:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:12:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:12:20] Production.INFO: ==30694== Releasing lock...  
[2025-03-18 06:12:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:12:20] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:13:05
    [end_date_ymd] => 2025-03-18 06:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:13:05' and `end` < '2025-03-18 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-18 06:13:17] Production.INFO: count ==63  
[2025-03-18 06:13:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:13:05 - End Time 2025-03-18 06:13:05  
[2025-03-18 06:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706250', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706250', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706250', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706250', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:13:17] Production.INFO: ProcessCDR(1,14706250,1,1,2)  
[2025-03-18 06:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706250,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706250,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706250', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706250', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:13:21] Production.INFO: ==30773== Releasing lock...  
[2025-03-18 06:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:13:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:14:05
    [end_date_ymd] => 2025-03-18 06:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:14:05' and `end` < '2025-03-18 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-18 06:14:17] Production.INFO: count ==69  
[2025-03-18 06:14:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:14:05 - End Time 2025-03-18 06:14:05  
[2025-03-18 06:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706255', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706255', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706255', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706255', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:14:17] Production.INFO: ProcessCDR(1,14706255,1,1,2)  
[2025-03-18 06:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706255,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706255,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706255', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706255', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:14:21] Production.INFO: ==30859== Releasing lock...  
[2025-03-18 06:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:14:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:15:05
    [end_date_ymd] => 2025-03-18 06:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:15:05' and `end` < '2025-03-18 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-18 06:15:17] Production.INFO: count ==69  
[2025-03-18 06:15:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:15:05 - End Time 2025-03-18 06:15:05  
[2025-03-18 06:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706260', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706260', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706260', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706260', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:15:17] Production.INFO: ProcessCDR(1,14706260,1,1,2)  
[2025-03-18 06:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706260', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706260', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:15:21] Production.INFO: ==30944== Releasing lock...  
[2025-03-18 06:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:15:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:16:05
    [end_date_ymd] => 2025-03-18 06:16:05
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:16:05' and `end` < '2025-03-18 06: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-18 06:16:17] Production.INFO: count ==69  
[2025-03-18 06:16:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:16:05 - End Time 2025-03-18 06:16:05  
[2025-03-18 06:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706265', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706265', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706265', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706265', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:16:17] Production.INFO: ProcessCDR(1,14706265,1,1,2)  
[2025-03-18 06:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706265', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706265', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:16:20] Production.INFO: ==31025== Releasing lock...  
[2025-03-18 06:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:16:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:17:06
    [end_date_ymd] => 2025-03-18 06:17:06
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:17:06' and `end` < '2025-03-18 06: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-18 06:17:18] Production.INFO: count ==69  
[2025-03-18 06:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:17:06 - End Time 2025-03-18 06:17:06  
[2025-03-18 06:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706270', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706270', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706270', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706270', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:17:18] Production.INFO: ProcessCDR(1,14706270,1,1,2)  
[2025-03-18 06:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706270', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706270', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:17:21] Production.INFO: ==31102== Releasing lock...  
[2025-03-18 06:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:17:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:18:05
    [end_date_ymd] => 2025-03-18 06:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:18:05' and `end` < '2025-03-18 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-18 06:18:17] Production.INFO: count ==69  
[2025-03-18 06:18:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:18:05 - End Time 2025-03-18 06:18:05  
[2025-03-18 06:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706275', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706275', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706275', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706275', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:18:17] Production.INFO: ProcessCDR(1,14706275,1,1,2)  
[2025-03-18 06:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:18:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:18:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:18:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706275', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:18:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706275', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:18:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:18:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:18:20] Production.INFO: ==31186== Releasing lock...  
[2025-03-18 06:18:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:18:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:19:05
    [end_date_ymd] => 2025-03-18 06:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:19:05' and `end` < '2025-03-18 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-18 06:19:17] Production.INFO: count ==69  
[2025-03-18 06:19:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:19:05 - End Time 2025-03-18 06:19:05  
[2025-03-18 06:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706280', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706280', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706280', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706280', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:19:17] Production.INFO: ProcessCDR(1,14706280,1,1,2)  
[2025-03-18 06:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706280', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706280', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:19:21] Production.INFO: ==31265== Releasing lock...  
[2025-03-18 06:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:19:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:20:06
    [end_date_ymd] => 2025-03-18 06:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:20:06' and `end` < '2025-03-18 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-18 06:20:18] Production.INFO: count ==61  
[2025-03-18 06:20:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:20:06 - End Time 2025-03-18 06:20:06  
[2025-03-18 06:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706286', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706286', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706286', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706286', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:20:18] Production.INFO: ProcessCDR(1,14706286,1,1,2)  
[2025-03-18 06:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706286,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706286,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706286', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706286', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:20:21] Production.INFO: ==31349== Releasing lock...  
[2025-03-18 06:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:20:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:21:05
    [end_date_ymd] => 2025-03-18 06:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:21:05' and `end` < '2025-03-18 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-18 06:21:17] Production.INFO: count ==61  
[2025-03-18 06:21:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:21:05 - End Time 2025-03-18 06:21:05  
[2025-03-18 06:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706291', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706291', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706291', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706291', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:21:17] Production.INFO: ProcessCDR(1,14706291,1,1,2)  
[2025-03-18 06:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706291,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706291,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706291,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706291,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706291', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706291', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:21:21] Production.INFO: ==31435== Releasing lock...  
[2025-03-18 06:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:21:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:22:05
    [end_date_ymd] => 2025-03-18 06:22:05
    [RateCDR] => 1
)
  
[2025-03-18 06:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:22:05' and `end` < '2025-03-18 06:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:22:18] Production.INFO: count ==61  
[2025-03-18 06:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:22:05 - End Time 2025-03-18 06:22:05  
[2025-03-18 06:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706296', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706296', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706296', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706296', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:22:18] Production.INFO: ProcessCDR(1,14706296,1,1,2)  
[2025-03-18 06:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706296,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:22:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706296,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:22:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706296,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706296,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706296', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706296', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:22:21] Production.INFO: ==31518== Releasing lock...  
[2025-03-18 06:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:22:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:23:06
    [end_date_ymd] => 2025-03-18 06:23:06
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:23:06' and `end` < '2025-03-18 06: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-18 06:23:18] Production.INFO: count ==61  
[2025-03-18 06:23:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:23:06 - End Time 2025-03-18 06:23:06  
[2025-03-18 06:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706301', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706301', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706301', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706301', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:23:18] Production.INFO: ProcessCDR(1,14706301,1,1,2)  
[2025-03-18 06:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706301,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706301,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706301,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706301,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706301', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706301', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:23:21] Production.INFO: ==31596== Releasing lock...  
[2025-03-18 06:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:23:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:24:05
    [end_date_ymd] => 2025-03-18 06:24:05
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:24:05' and `end` < '2025-03-18 06: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-18 06:24:17] Production.INFO: count ==61  
[2025-03-18 06:24:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:24:05 - End Time 2025-03-18 06:24:05  
[2025-03-18 06:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706306', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706306', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706306', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706306', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:24:17] Production.INFO: ProcessCDR(1,14706306,1,1,2)  
[2025-03-18 06:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:24:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:24:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:24:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706306', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:24:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706306', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:24:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:24:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:24:20] Production.INFO: ==31679== Releasing lock...  
[2025-03-18 06:24:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:24:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:25:05
    [end_date_ymd] => 2025-03-18 06:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:25:05' and `end` < '2025-03-18 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-18 06:25:17] Production.INFO: count ==61  
[2025-03-18 06:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:25:05 - End Time 2025-03-18 06:25:05  
[2025-03-18 06:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706311', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706311', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706311', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706311', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:25:17] Production.INFO: ProcessCDR(1,14706311,1,1,2)  
[2025-03-18 06:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706311', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706311', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:25:20] Production.INFO: ==31758== Releasing lock...  
[2025-03-18 06:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:25:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:26:05
    [end_date_ymd] => 2025-03-18 06:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:26:05' and `end` < '2025-03-18 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-18 06:26:17] Production.INFO: count ==61  
[2025-03-18 06:26:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:26:05 - End Time 2025-03-18 06:26:05  
[2025-03-18 06:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706316', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706316', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706316', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706316', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:26:17] Production.INFO: ProcessCDR(1,14706316,1,1,2)  
[2025-03-18 06:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706316,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:26:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706316,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:26:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706316,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:26:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706316,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706316', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:26:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706316', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:26:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:26:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:26:20] Production.INFO: ==31884== Releasing lock...  
[2025-03-18 06:26:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:26:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:27:05
    [end_date_ymd] => 2025-03-18 06:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:27:05' and `end` < '2025-03-18 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-18 06:27:18] Production.INFO: count ==61  
[2025-03-18 06:27:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:27:05 - End Time 2025-03-18 06:27:05  
[2025-03-18 06:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706321', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706321', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706321', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706321', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:27:18] Production.INFO: ProcessCDR(1,14706321,1,1,2)  
[2025-03-18 06:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706321,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706321,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706321,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706321,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706321', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706321', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:27:21] Production.INFO: ==31964== Releasing lock...  
[2025-03-18 06:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:27:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:28:05
    [end_date_ymd] => 2025-03-18 06:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:28:05' and `end` < '2025-03-18 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-18 06:28:17] Production.INFO: count ==61  
[2025-03-18 06:28:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:28:05 - End Time 2025-03-18 06:28:05  
[2025-03-18 06:28:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706326', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706326', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706326', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:28:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706326', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:28:17] Production.INFO: ProcessCDR(1,14706326,1,1,2)  
[2025-03-18 06:28:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706326,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:28:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706326,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:28:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706326,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:28:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706326,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706326', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:28:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706326', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:28:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:28:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:28:20] Production.INFO: ==32055== Releasing lock...  
[2025-03-18 06:28:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:28:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:29:05
    [end_date_ymd] => 2025-03-18 06:29:05
    [RateCDR] => 1
)
  
[2025-03-18 06:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:29:05' and `end` < '2025-03-18 06:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:29:17] Production.INFO: count ==61  
[2025-03-18 06:29:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:29:05 - End Time 2025-03-18 06:29:05  
[2025-03-18 06:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706331', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706331', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706331', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706331', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:29:17] Production.INFO: ProcessCDR(1,14706331,1,1,2)  
[2025-03-18 06:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706331,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:29:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706331,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:29:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706331,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706331,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706331', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706331', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:29:21] Production.INFO: ==32136== Releasing lock...  
[2025-03-18 06:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:29:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:30:05
    [end_date_ymd] => 2025-03-18 06:30:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:30:05' and `end` < '2025-03-18 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-18 06:30:18] Production.INFO: count ==63  
[2025-03-18 06:30:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:30:05 - End Time 2025-03-18 06:30:05  
[2025-03-18 06:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706337', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706337', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706337', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706337', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:30:18] Production.INFO: ProcessCDR(1,14706337,1,1,2)  
[2025-03-18 06:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706337,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:30:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706337,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706337', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:30:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706337', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:30:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:30:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:30:21] Production.INFO: ==32223== Releasing lock...  
[2025-03-18 06:30:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:30:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:31:05
    [end_date_ymd] => 2025-03-18 06:31:05
    [RateCDR] => 1
)
  
[2025-03-18 06:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:31:05' and `end` < '2025-03-18 06:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:31:18] Production.INFO: count ==63  
[2025-03-18 06:31:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:31:05 - End Time 2025-03-18 06:31:05  
[2025-03-18 06:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706342', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706342', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706342', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706342', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:31:18] Production.INFO: ProcessCDR(1,14706342,1,1,2)  
[2025-03-18 06:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706342,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706342,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706342', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706342', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:31:21] Production.INFO: ==32300== Releasing lock...  
[2025-03-18 06:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:31:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:32:05
    [end_date_ymd] => 2025-03-18 06:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:32:05' and `end` < '2025-03-18 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-18 06:32:17] Production.INFO: count ==63  
[2025-03-18 06:32:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:32:05 - End Time 2025-03-18 06:32:05  
[2025-03-18 06:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706347', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706347', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706347', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706347', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:32:17] Production.INFO: ProcessCDR(1,14706347,1,1,2)  
[2025-03-18 06:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706347,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:32:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706347,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:32:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706347', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:32:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706347', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:32:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:32:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:32:20] Production.INFO: ==32381== Releasing lock...  
[2025-03-18 06:32:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:32:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:33:05
    [end_date_ymd] => 2025-03-18 06:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:33:05' and `end` < '2025-03-18 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-18 06:33:17] Production.INFO: count ==63  
[2025-03-18 06:33:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:33:05 - End Time 2025-03-18 06:33:05  
[2025-03-18 06:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706352', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706352', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706352', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706352', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:33:17] Production.INFO: ProcessCDR(1,14706352,1,1,2)  
[2025-03-18 06:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706352,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706352,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706352', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706352', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:33:21] Production.INFO: ==32453== Releasing lock...  
[2025-03-18 06:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:33:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:34:05
    [end_date_ymd] => 2025-03-18 06:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:34:05' and `end` < '2025-03-18 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-18 06:34:17] Production.INFO: count ==63  
[2025-03-18 06:34:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:34:05 - End Time 2025-03-18 06:34:05  
[2025-03-18 06:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706357', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706357', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706357', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706357', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:34:17] Production.INFO: ProcessCDR(1,14706357,1,1,2)  
[2025-03-18 06:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:34:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706357', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:34:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706357', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:34:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:34:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:34:20] Production.INFO: ==32535== Releasing lock...  
[2025-03-18 06:34:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:34:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:35:05
    [end_date_ymd] => 2025-03-18 06:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:35:05' and `end` < '2025-03-18 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-18 06:35:17] Production.INFO: count ==64  
[2025-03-18 06:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:35:05 - End Time 2025-03-18 06:35:05  
[2025-03-18 06:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706362', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706362', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706362', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706362', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:35:17] Production.INFO: ProcessCDR(1,14706362,1,1,2)  
[2025-03-18 06:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706362,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:35:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706362,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:35:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706362,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:35:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706362,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706362', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706362', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:35:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:35:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:35:22] Production.INFO: ==32614== Releasing lock...  
[2025-03-18 06:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:35:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:36:05
    [end_date_ymd] => 2025-03-18 06:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:36:05' and `end` < '2025-03-18 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-18 06:36:17] Production.INFO: count ==64  
[2025-03-18 06:36:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:36:05 - End Time 2025-03-18 06:36:05  
[2025-03-18 06:36:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706367', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706367', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706367', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:36:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706367', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:36:17] Production.INFO: ProcessCDR(1,14706367,1,1,2)  
[2025-03-18 06:36:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706367,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:36:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706367,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:36:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706367,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:36:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706367,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706367', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:36:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706367', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:36:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:36:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:36:20] Production.INFO: ==32688== Releasing lock...  
[2025-03-18 06:36:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:36:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:37:05
    [end_date_ymd] => 2025-03-18 06:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:37:05' and `end` < '2025-03-18 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-18 06:37:17] Production.INFO: count ==64  
[2025-03-18 06:37:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:37:05 - End Time 2025-03-18 06:37:05  
[2025-03-18 06:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706371', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706371', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:37:17] Production.INFO: ProcessCDR(1,14706371,1,1,2)  
[2025-03-18 06:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:37:21] Production.INFO: ==303== Releasing lock...  
[2025-03-18 06:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:37:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:38:05
    [end_date_ymd] => 2025-03-18 06:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:38:05' and `end` < '2025-03-18 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-18 06:38:17] Production.INFO: count ==61  
[2025-03-18 06:38:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:38:05 - End Time 2025-03-18 06:38:05  
[2025-03-18 06:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706377', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706377', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706377', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706377', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:38:17] Production.INFO: ProcessCDR(1,14706377,1,1,2)  
[2025-03-18 06:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706377,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706377,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706377,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:38:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706377,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706377', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706377', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:38:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:38:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:38:20] Production.INFO: ==401== Releasing lock...  
[2025-03-18 06:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:38:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:39:06
    [end_date_ymd] => 2025-03-18 06:39:06
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:39:06' and `end` < '2025-03-18 06: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-18 06:39:18] Production.INFO: count ==61  
[2025-03-18 06:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:39:06 - End Time 2025-03-18 06:39:06  
[2025-03-18 06:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706382', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706382', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706382', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706382', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:39:18] Production.INFO: ProcessCDR(1,14706382,1,1,2)  
[2025-03-18 06:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706382,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706382,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706382,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706382,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706382', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706382', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:39:21] Production.INFO: ==481== Releasing lock...  
[2025-03-18 06:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:39:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:40:06
    [end_date_ymd] => 2025-03-18 06:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:40:06' and `end` < '2025-03-18 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-18 06:40:18] Production.INFO: count ==53  
[2025-03-18 06:40:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:40:06 - End Time 2025-03-18 06:40:06  
[2025-03-18 06:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706388', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706388', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706388', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706388', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:40:18] Production.INFO: ProcessCDR(1,14706388,1,1,2)  
[2025-03-18 06:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706388,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:40:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706388,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706388', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:40:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706388', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:40:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:40:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:40:21] Production.INFO: ==571== Releasing lock...  
[2025-03-18 06:40:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:40:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:41:05
    [end_date_ymd] => 2025-03-18 06:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:41:05' and `end` < '2025-03-18 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-18 06:41:17] Production.INFO: count ==53  
[2025-03-18 06:41:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:41:05 - End Time 2025-03-18 06:41:05  
[2025-03-18 06:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706393', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706393', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706393', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706393', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:41:17] Production.INFO: ProcessCDR(1,14706393,1,1,2)  
[2025-03-18 06:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706393,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706393,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706393', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706393', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:41:21] Production.INFO: ==655== Releasing lock...  
[2025-03-18 06:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:41:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:42:06
    [end_date_ymd] => 2025-03-18 06:42:06
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:42:06' and `end` < '2025-03-18 06: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-18 06:42:18] Production.INFO: count ==53  
[2025-03-18 06:42:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:42:06 - End Time 2025-03-18 06:42:06  
[2025-03-18 06:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706398', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706398', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706398', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706398', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:42:18] Production.INFO: ProcessCDR(1,14706398,1,1,2)  
[2025-03-18 06:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:42:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706398,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:42:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706398,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706398', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706398', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:42:21] Production.INFO: ==814== Releasing lock...  
[2025-03-18 06:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:42:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:43:05
    [end_date_ymd] => 2025-03-18 06:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:43:05' and `end` < '2025-03-18 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-18 06:43:17] Production.INFO: count ==53  
[2025-03-18 06:43:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:43:05 - End Time 2025-03-18 06:43:05  
[2025-03-18 06:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706403', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706403', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706403', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706403', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:43:17] Production.INFO: ProcessCDR(1,14706403,1,1,2)  
[2025-03-18 06:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706403,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706403,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706403', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706403', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:43:21] Production.INFO: ==889== Releasing lock...  
[2025-03-18 06:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:43:21] Production.INFO: 28 MB  #Memory Used#   
[2025-03-18 06:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:44:05
    [end_date_ymd] => 2025-03-18 06:44:05
    [RateCDR] => 1
)
  
[2025-03-18 06:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:44:05' and `end` < '2025-03-18 06:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:44:18] Production.INFO: count ==56  
[2025-03-18 06:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:44:05 - End Time 2025-03-18 06:44:05  
[2025-03-18 06:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706408', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706408', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706408', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706408', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:44:18] Production.INFO: ProcessCDR(1,14706408,1,1,2)  
[2025-03-18 06:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:44:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:44:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706408', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706408', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:44:21] Production.INFO: ==968== Releasing lock...  
[2025-03-18 06:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:44:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:45:05
    [end_date_ymd] => 2025-03-18 06:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:45:05' and `end` < '2025-03-18 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-18 06:45:17] Production.INFO: count ==59  
[2025-03-18 06:45:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:45:05 - End Time 2025-03-18 06:45:05  
[2025-03-18 06:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706413', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706413', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706413', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706413', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:45:17] Production.INFO: ProcessCDR(1,14706413,1,1,2)  
[2025-03-18 06:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706413,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706413,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706413,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706413,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706413', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706413', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:45:21] Production.INFO: ==1053== Releasing lock...  
[2025-03-18 06:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:45:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:46:05
    [end_date_ymd] => 2025-03-18 06:46:05
    [RateCDR] => 1
)
  
[2025-03-18 06:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:46:05' and `end` < '2025-03-18 06:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:46:17] Production.INFO: count ==59  
[2025-03-18 06:46:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:46:05 - End Time 2025-03-18 06:46:05  
[2025-03-18 06:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706418', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706418', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706418', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706418', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:46:17] Production.INFO: ProcessCDR(1,14706418,1,1,2)  
[2025-03-18 06:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706418,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706418,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706418,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706418,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706418', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706418', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:46:21] Production.INFO: ==1138== Releasing lock...  
[2025-03-18 06:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:46:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:47:06
    [end_date_ymd] => 2025-03-18 06:47:06
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:47:06' and `end` < '2025-03-18 06: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-18 06:47:18] Production.INFO: count ==59  
[2025-03-18 06:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:47:06 - End Time 2025-03-18 06:47:06  
[2025-03-18 06:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706423', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706423', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706423', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706423', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:47:18] Production.INFO: ProcessCDR(1,14706423,1,1,2)  
[2025-03-18 06:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706423,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706423,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706423,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:47:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706423,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:47:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706423', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:47:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706423', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:47:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:47:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:47:22] Production.INFO: ==1230== Releasing lock...  
[2025-03-18 06:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:47:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:48:06
    [end_date_ymd] => 2025-03-18 06:48:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:48:06' and `end` < '2025-03-18 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-18 06:48:18] Production.INFO: count ==59  
[2025-03-18 06:48:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:48:06 - End Time 2025-03-18 06:48:06  
[2025-03-18 06:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706428', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706428', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706428', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706428', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:48:18] Production.INFO: ProcessCDR(1,14706428,1,1,2)  
[2025-03-18 06:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706428,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706428,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706428,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:48:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706428,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706428', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706428', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:48:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:48:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:48:22] Production.INFO: ==1333== Releasing lock...  
[2025-03-18 06:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:48:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:49:05
    [end_date_ymd] => 2025-03-18 06:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:49:05' and `end` < '2025-03-18 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-18 06:49:17] Production.INFO: count ==59  
[2025-03-18 06:49:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:49:05 - End Time 2025-03-18 06:49:05  
[2025-03-18 06:49:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706433', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706433', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706433', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:49:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706433', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:49:17] Production.INFO: ProcessCDR(1,14706433,1,1,2)  
[2025-03-18 06:49:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706433,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:49:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706433,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:49:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706433,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:49:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706433,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706433', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:49:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706433', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:49:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:49:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:49:20] Production.INFO: ==1413== Releasing lock...  
[2025-03-18 06:49:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:49:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:50:06
    [end_date_ymd] => 2025-03-18 06:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:50:06' and `end` < '2025-03-18 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-18 06:50:18] Production.INFO: count ==59  
[2025-03-18 06:50:18] Production.ERROR: pbx CDR StartTime 2025-03-18 03:50:06 - End Time 2025-03-18 06:50:06  
[2025-03-18 06:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706439', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706439', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706439', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706439', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:50:18] Production.INFO: ProcessCDR(1,14706439,1,1,2)  
[2025-03-18 06:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706439,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:50:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706439,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706439', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:50:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706439', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:50:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:50:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:50:21] Production.INFO: ==1499== Releasing lock...  
[2025-03-18 06:50:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:50:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:51:05
    [end_date_ymd] => 2025-03-18 06:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:51:05' and `end` < '2025-03-18 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-18 06:51:17] Production.INFO: count ==59  
[2025-03-18 06:51:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:51:05 - End Time 2025-03-18 06:51:05  
[2025-03-18 06:51:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706444', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706444', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706444', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:51:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706444', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:51:17] Production.INFO: ProcessCDR(1,14706444,1,1,2)  
[2025-03-18 06:51:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:51:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706444,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:51:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706444,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706444', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706444', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:51:21] Production.INFO: ==1622== Releasing lock...  
[2025-03-18 06:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:51:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:52:05
    [end_date_ymd] => 2025-03-18 06:52:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:52:05' and `end` < '2025-03-18 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-18 06:52:17] Production.INFO: count ==59  
[2025-03-18 06:52:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:52:05 - End Time 2025-03-18 06:52:05  
[2025-03-18 06:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706449', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706449', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706449', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706449', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:52:17] Production.INFO: ProcessCDR(1,14706449,1,1,2)  
[2025-03-18 06:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706449,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706449,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706449', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706449', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:52:21] Production.INFO: ==1701== Releasing lock...  
[2025-03-18 06:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:52:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:53:05
    [end_date_ymd] => 2025-03-18 06:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:53:05' and `end` < '2025-03-18 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-18 06:53:17] Production.INFO: count ==59  
[2025-03-18 06:53:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:53:05 - End Time 2025-03-18 06:53:05  
[2025-03-18 06:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706454', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706454', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706454', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706454', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:53:17] Production.INFO: ProcessCDR(1,14706454,1,1,2)  
[2025-03-18 06:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706454,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:53:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706454,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706454', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:53:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706454', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:53:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:53:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:53:20] Production.INFO: ==1783== Releasing lock...  
[2025-03-18 06:53:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:53:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:54:05
    [end_date_ymd] => 2025-03-18 06:54:05
    [RateCDR] => 1
)
  
[2025-03-18 06: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-18 03:54:05' and `end` < '2025-03-18 06: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-18 06:54:17] Production.INFO: count ==59  
[2025-03-18 06:54:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:54:05 - End Time 2025-03-18 06:54:05  
[2025-03-18 06:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706459', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706459', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706459', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706459', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:54:17] Production.INFO: ProcessCDR(1,14706459,1,1,2)  
[2025-03-18 06:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:54:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706459', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:54:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706459', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:54:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:54:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:54:20] Production.INFO: ==1872== Releasing lock...  
[2025-03-18 06:54:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:54:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:55:05
    [end_date_ymd] => 2025-03-18 06:55:05
    [RateCDR] => 1
)
  
[2025-03-18 06:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:55:05' and `end` < '2025-03-18 06:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:55:17] Production.INFO: count ==59  
[2025-03-18 06:55:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:55:05 - End Time 2025-03-18 06:55:05  
[2025-03-18 06:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706464', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706464', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706464', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706464', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:55:17] Production.INFO: ProcessCDR(1,14706464,1,1,2)  
[2025-03-18 06:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706464', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706464', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:55:20] Production.INFO: ==1951== Releasing lock...  
[2025-03-18 06:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:55:20] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:56:05
    [end_date_ymd] => 2025-03-18 06:56:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:56:05' and `end` < '2025-03-18 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-18 06:56:17] Production.INFO: count ==59  
[2025-03-18 06:56:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:56:05 - End Time 2025-03-18 06:56:05  
[2025-03-18 06:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706469', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706469', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706469', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706469', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:56:17] Production.INFO: ProcessCDR(1,14706469,1,1,2)  
[2025-03-18 06:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706469,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:56:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706469,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:56:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706469,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706469,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706469', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706469', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:56:21] Production.INFO: ==2038== Releasing lock...  
[2025-03-18 06:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:56:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:57:05
    [end_date_ymd] => 2025-03-18 06:57:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:57:05' and `end` < '2025-03-18 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-18 06:57:17] Production.INFO: count ==59  
[2025-03-18 06:57:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:57:05 - End Time 2025-03-18 06:57:05  
[2025-03-18 06:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706474', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706474', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706474', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706474', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:57:17] Production.INFO: ProcessCDR(1,14706474,1,1,2)  
[2025-03-18 06:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706474,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706474,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706474,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706474,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706474', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706474', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:57:21] Production.INFO: ==2161== Releasing lock...  
[2025-03-18 06:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:57:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:58:05
    [end_date_ymd] => 2025-03-18 06:58:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 03:58:05' and `end` < '2025-03-18 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-18 06:58:17] Production.INFO: count ==56  
[2025-03-18 06:58:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:58:05 - End Time 2025-03-18 06:58:05  
[2025-03-18 06:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706479', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706479', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706479', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706479', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:58:17] Production.INFO: ProcessCDR(1,14706479,1,1,2)  
[2025-03-18 06:58:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706479,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706479,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706479,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706479,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706479', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706479', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:58:21] Production.INFO: ==2244== Releasing lock...  
[2025-03-18 06:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:58:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 06:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 03:59:05
    [end_date_ymd] => 2025-03-18 06:59:05
    [RateCDR] => 1
)
  
[2025-03-18 06:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 03:59:05' and `end` < '2025-03-18 06:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 06:59:17] Production.INFO: count ==56  
[2025-03-18 06:59:17] Production.ERROR: pbx CDR StartTime 2025-03-18 03:59:05 - End Time 2025-03-18 06:59:05  
[2025-03-18 06:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706484', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706484', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706484', 'tblTempVendorCDR_20' ) start  
[2025-03-18 06:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706484', 'tblTempVendorCDR_20' ) end  
[2025-03-18 06:59:17] Production.INFO: ProcessCDR(1,14706484,1,1,2)  
[2025-03-18 06:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706484,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706484,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 06:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706484,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706484,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 06:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706484', 'tblTempUsageDetail_20' ) start  
[2025-03-18 06:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706484', 'tblTempUsageDetail_20' ) end  
[2025-03-18 06:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 06:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 06:59:21] Production.INFO: ==2325== Releasing lock...  
[2025-03-18 06:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 06:59:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:00:06
    [end_date_ymd] => 2025-03-18 07:00:06
    [RateCDR] => 1
)
  
[2025-03-18 07:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:00:06' and `end` < '2025-03-18 07:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:00:18] Production.INFO: count ==56  
[2025-03-18 07:00:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:00:06 - End Time 2025-03-18 07:00:06  
[2025-03-18 07:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706490', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706490', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706490', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706490', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:00:18] Production.INFO: ProcessCDR(1,14706490,1,1,2)  
[2025-03-18 07:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706490,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706490,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706490', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706490', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:00:22] Production.INFO: ==2410== Releasing lock...  
[2025-03-18 07:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:00:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:01:05
    [end_date_ymd] => 2025-03-18 07:01:05
    [RateCDR] => 1
)
  
[2025-03-18 07:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:01:05' and `end` < '2025-03-18 07:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:01:18] Production.INFO: count ==56  
[2025-03-18 07:01:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:01:05 - End Time 2025-03-18 07:01:05  
[2025-03-18 07:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706495', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706495', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706495', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706495', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:01:18] Production.INFO: ProcessCDR(1,14706495,1,1,2)  
[2025-03-18 07:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706495,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706495,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706495', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706495', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:01:21] Production.INFO: ==2585== Releasing lock...  
[2025-03-18 07:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:01:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:02:05
    [end_date_ymd] => 2025-03-18 07:02:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:02:05' and `end` < '2025-03-18 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-18 07:02:17] Production.INFO: count ==56  
[2025-03-18 07:02:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:02:05 - End Time 2025-03-18 07:02:05  
[2025-03-18 07:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706500', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706500', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706500', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706500', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:02:17] Production.INFO: ProcessCDR(1,14706500,1,1,2)  
[2025-03-18 07:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706500,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706500,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706500', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706500', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:02:21] Production.INFO: ==2667== Releasing lock...  
[2025-03-18 07:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:02:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:03:05
    [end_date_ymd] => 2025-03-18 07:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:03:05' and `end` < '2025-03-18 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-18 07:03:18] Production.INFO: count ==56  
[2025-03-18 07:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:03:05 - End Time 2025-03-18 07:03:05  
[2025-03-18 07:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706505', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706505', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706505', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706505', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:03:18] Production.INFO: ProcessCDR(1,14706505,1,1,2)  
[2025-03-18 07:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706505,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706505,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706505', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706505', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:03:22] Production.INFO: ==2746== Releasing lock...  
[2025-03-18 07:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:03:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:04:05
    [end_date_ymd] => 2025-03-18 07:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:04:05' and `end` < '2025-03-18 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-18 07:04:18] Production.INFO: count ==56  
[2025-03-18 07:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:04:05 - End Time 2025-03-18 07:04:05  
[2025-03-18 07:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706510', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706510', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706510', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706510', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:04:18] Production.INFO: ProcessCDR(1,14706510,1,1,2)  
[2025-03-18 07:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706510', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706510', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:04:22] Production.INFO: ==2836== Releasing lock...  
[2025-03-18 07:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:04:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:05:06
    [end_date_ymd] => 2025-03-18 07:05:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:05:06' and `end` < '2025-03-18 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-18 07:05:18] Production.INFO: count ==56  
[2025-03-18 07:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:05:06 - End Time 2025-03-18 07:05:06  
[2025-03-18 07:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706515', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706515', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706515', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706515', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:05:18] Production.INFO: ProcessCDR(1,14706515,1,1,2)  
[2025-03-18 07:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706515', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706515', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:05:22] Production.INFO: ==3000== Releasing lock...  
[2025-03-18 07:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:05:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:06:05
    [end_date_ymd] => 2025-03-18 07:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:06:05' and `end` < '2025-03-18 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-18 07:06:18] Production.INFO: count ==56  
[2025-03-18 07:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:06:05 - End Time 2025-03-18 07:06:05  
[2025-03-18 07:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706520', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706520', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706520', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706520', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:06:18] Production.INFO: ProcessCDR(1,14706520,1,1,2)  
[2025-03-18 07:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706520,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:06:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706520,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:06:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706520,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706520,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706520', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706520', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:06:22] Production.INFO: ==3085== Releasing lock...  
[2025-03-18 07:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:06:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:07:06
    [end_date_ymd] => 2025-03-18 07:07:06
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:07:06' and `end` < '2025-03-18 07: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-18 07:07:19] Production.INFO: count ==56  
[2025-03-18 07:07:19] Production.ERROR: pbx CDR StartTime 2025-03-18 04:07:06 - End Time 2025-03-18 07:07:06  
[2025-03-18 07:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706525', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706525', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706525', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706525', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:07:19] Production.INFO: ProcessCDR(1,14706525,1,1,2)  
[2025-03-18 07:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706525,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:07:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706525,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:07:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706525,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:07:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706525,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:07:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706525', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:07:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706525', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:07:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:07:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:07:23] Production.INFO: ==3168== Releasing lock...  
[2025-03-18 07:07:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:07:23] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:08:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:08:04
    [end_date_ymd] => 2025-03-18 07:08:04
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:08:04' and `end` < '2025-03-18 07: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-18 07:08:17] Production.INFO: count ==59  
[2025-03-18 07:08:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:08:04 - End Time 2025-03-18 07:08:04  
[2025-03-18 07:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706530', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706530', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706530', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706530', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:08:17] Production.INFO: ProcessCDR(1,14706530,1,1,2)  
[2025-03-18 07:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706530', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706530', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:08:21] Production.INFO: ==3330== Releasing lock...  
[2025-03-18 07:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:08:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:09:05
    [end_date_ymd] => 2025-03-18 07:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:09:05' and `end` < '2025-03-18 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-18 07:09:18] Production.INFO: count ==59  
[2025-03-18 07:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:09:05 - End Time 2025-03-18 07:09:05  
[2025-03-18 07:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706535', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706535', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706535', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706535', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:09:18] Production.INFO: ProcessCDR(1,14706535,1,1,2)  
[2025-03-18 07:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706535,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706535,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706535,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706535,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706535', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706535', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:09:21] Production.INFO: ==3417== Releasing lock...  
[2025-03-18 07:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:09:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:10:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:10:05
    [end_date_ymd] => 2025-03-18 07:10:05
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:10:05' and `end` < '2025-03-18 07: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-18 07:10:18] Production.INFO: count ==67  
[2025-03-18 07:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:10:05 - End Time 2025-03-18 07:10:05  
[2025-03-18 07:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706541', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706541', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706541', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706541', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:10:18] Production.INFO: ProcessCDR(1,14706541,1,1,2)  
[2025-03-18 07:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706541,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706541,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706541', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706541', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:10:21] Production.INFO: ==3508== Releasing lock...  
[2025-03-18 07:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:10:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:11:06
    [end_date_ymd] => 2025-03-18 07:11:06
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:11:06' and `end` < '2025-03-18 07: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-18 07:11:19] Production.INFO: count ==67  
[2025-03-18 07:11:19] Production.ERROR: pbx CDR StartTime 2025-03-18 04:11:06 - End Time 2025-03-18 07:11:06  
[2025-03-18 07:11:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706546', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706546', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706546', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706546', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:11:19] Production.INFO: ProcessCDR(1,14706546,1,1,2)  
[2025-03-18 07:11:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:11:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706546,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:11:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:11:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706546,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706546', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706546', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:11:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:11:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:11:22] Production.INFO: ==3594== Releasing lock...  
[2025-03-18 07:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:11:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:12:06
    [end_date_ymd] => 2025-03-18 07:12:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:12:06' and `end` < '2025-03-18 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-18 07:12:18] Production.INFO: count ==67  
[2025-03-18 07:12:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:12:06 - End Time 2025-03-18 07:12:06  
[2025-03-18 07:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706551', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706551', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706551', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706551', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:12:18] Production.INFO: ProcessCDR(1,14706551,1,1,2)  
[2025-03-18 07:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706551,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706551,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706551', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706551', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:12:21] Production.INFO: ==3753== Releasing lock...  
[2025-03-18 07:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:12:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:13:05
    [end_date_ymd] => 2025-03-18 07:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:13:05' and `end` < '2025-03-18 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-18 07:13:19] Production.INFO: count ==69  
[2025-03-18 07:13:19] Production.ERROR: pbx CDR StartTime 2025-03-18 04:13:05 - End Time 2025-03-18 07:13:05  
[2025-03-18 07:13:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706556', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706556', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706556', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706556', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:13:19] Production.INFO: ProcessCDR(1,14706556,1,1,2)  
[2025-03-18 07:13:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:13:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706556,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:13:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:13:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706556,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:13:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706556', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:13:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706556', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:13:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:13:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:13:22] Production.INFO: ==3875== Releasing lock...  
[2025-03-18 07:13:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:13:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:14:05
    [end_date_ymd] => 2025-03-18 07:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:14:05' and `end` < '2025-03-18 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-18 07:14:18] Production.INFO: count ==69  
[2025-03-18 07:14:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:14:05 - End Time 2025-03-18 07:14:05  
[2025-03-18 07:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706560', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706560', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:14:18] Production.INFO: ProcessCDR(1,14706560,1,1,2)  
[2025-03-18 07:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:14:21] Production.INFO: ==3959== Releasing lock...  
[2025-03-18 07:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:14:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:15:05
    [end_date_ymd] => 2025-03-18 07:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:15:05' and `end` < '2025-03-18 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-18 07:15:18] Production.INFO: count ==69  
[2025-03-18 07:15:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:15:05 - End Time 2025-03-18 07:15:05  
[2025-03-18 07:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706566', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706566', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706566', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706566', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:15:18] Production.INFO: ProcessCDR(1,14706566,1,1,2)  
[2025-03-18 07:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706566', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706566', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:15:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:15:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:15:22] Production.INFO: ==4119== Releasing lock...  
[2025-03-18 07:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:15:22] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:16:05
    [end_date_ymd] => 2025-03-18 07:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:16:05' and `end` < '2025-03-18 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-18 07:16:18] Production.INFO: count ==75  
[2025-03-18 07:16:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:16:05 - End Time 2025-03-18 07:16:05  
[2025-03-18 07:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706571', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706571', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706571', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706571', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:16:18] Production.INFO: ProcessCDR(1,14706571,1,1,2)  
[2025-03-18 07:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706571,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706571,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706571,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:16:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706571,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706571', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:16:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706571', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:16:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:16:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:16:21] Production.INFO: ==4204== Releasing lock...  
[2025-03-18 07:16:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:16:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:17:05
    [end_date_ymd] => 2025-03-18 07:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:17:05' and `end` < '2025-03-18 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-18 07:17:17] Production.INFO: count ==75  
[2025-03-18 07:17:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:17:05 - End Time 2025-03-18 07:17:05  
[2025-03-18 07:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706576', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706576', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706576', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706576', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:17:17] Production.INFO: ProcessCDR(1,14706576,1,1,2)  
[2025-03-18 07:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706576', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706576', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:17:21] Production.INFO: ==4277== Releasing lock...  
[2025-03-18 07:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:17:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:18:05
    [end_date_ymd] => 2025-03-18 07:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:18:05' and `end` < '2025-03-18 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-18 07:18:17] Production.INFO: count ==75  
[2025-03-18 07:18:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:18:05 - End Time 2025-03-18 07:18:05  
[2025-03-18 07:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706581', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706581', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706581', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706581', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:18:18] Production.INFO: ProcessCDR(1,14706581,1,1,2)  
[2025-03-18 07:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706581', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706581', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:18:21] Production.INFO: ==4360== Releasing lock...  
[2025-03-18 07:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:18:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:19:05
    [end_date_ymd] => 2025-03-18 07:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:19:05' and `end` < '2025-03-18 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-18 07:19:17] Production.INFO: count ==75  
[2025-03-18 07:19:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:19:05 - End Time 2025-03-18 07:19:05  
[2025-03-18 07:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706586', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706586', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:19:17] Production.INFO: ProcessCDR(1,14706586,1,1,2)  
[2025-03-18 07:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:19:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:19:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:19:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:19:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:19:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:19:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:19:20] Production.INFO: ==4443== Releasing lock...  
[2025-03-18 07:19:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:19:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:20:06
    [end_date_ymd] => 2025-03-18 07:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:20:06' and `end` < '2025-03-18 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-18 07:20:18] Production.INFO: count ==77  
[2025-03-18 07:20:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:20:06 - End Time 2025-03-18 07:20:06  
[2025-03-18 07:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706591', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706591', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:20:18] Production.INFO: ProcessCDR(1,14706591,1,1,2)  
[2025-03-18 07:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:20:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:20:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:20:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:20:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:20:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:20:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:20:21] Production.INFO: ==4528== Releasing lock...  
[2025-03-18 07:20:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:20:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:21:05
    [end_date_ymd] => 2025-03-18 07:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:21:05' and `end` < '2025-03-18 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-18 07:21:18] Production.INFO: count ==77  
[2025-03-18 07:21:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:21:05 - End Time 2025-03-18 07:21:05  
[2025-03-18 07:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706597', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706597', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706597', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706597', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:21:18] Production.INFO: ProcessCDR(1,14706597,1,1,2)  
[2025-03-18 07:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706597,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706597,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706597', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706597', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:21:21] Production.INFO: ==4613== Releasing lock...  
[2025-03-18 07:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:21:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:22:05
    [end_date_ymd] => 2025-03-18 07:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:22:05' and `end` < '2025-03-18 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-18 07:22:18] Production.INFO: count ==77  
[2025-03-18 07:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:22:05 - End Time 2025-03-18 07:22:05  
[2025-03-18 07:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706602', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706602', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706602', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706602', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:22:18] Production.INFO: ProcessCDR(1,14706602,1,1,2)  
[2025-03-18 07:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706602,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:22:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706602,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706602', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:22:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706602', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:22:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:22:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:22:21] Production.INFO: ==4695== Releasing lock...  
[2025-03-18 07:22:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:22:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:23:05
    [end_date_ymd] => 2025-03-18 07:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:23:05' and `end` < '2025-03-18 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-18 07:23:18] Production.INFO: count ==74  
[2025-03-18 07:23:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:23:05 - End Time 2025-03-18 07:23:05  
[2025-03-18 07:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706607', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706607', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706607', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706607', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:23:18] Production.INFO: ProcessCDR(1,14706607,1,1,2)  
[2025-03-18 07:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706607,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706607,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706607', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706607', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:23:21] Production.INFO: ==4776== Releasing lock...  
[2025-03-18 07:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:23:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:24:05
    [end_date_ymd] => 2025-03-18 07:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:24:05' and `end` < '2025-03-18 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-18 07:24:17] Production.INFO: count ==74  
[2025-03-18 07:24:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:24:05 - End Time 2025-03-18 07:24:05  
[2025-03-18 07:24:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706612', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706612', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706612', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:24:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706612', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:24:17] Production.INFO: ProcessCDR(1,14706612,1,1,2)  
[2025-03-18 07:24:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706612', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706612', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:24:21] Production.INFO: ==4850== Releasing lock...  
[2025-03-18 07:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:24:21] Production.INFO: 28.25 MB  #Memory Used#   
[2025-03-18 07:25:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:25:06
    [end_date_ymd] => 2025-03-18 07:25:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:25:06' and `end` < '2025-03-18 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-18 07:25:18] Production.INFO: count ==76  
[2025-03-18 07:25:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:25:06 - End Time 2025-03-18 07:25:06  
[2025-03-18 07:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706617', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706617', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706617', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706617', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:25:18] Production.INFO: ProcessCDR(1,14706617,1,1,2)  
[2025-03-18 07:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706617,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706617,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706617,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706617,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706617', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706617', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:25:21] Production.INFO: ==4925== Releasing lock...  
[2025-03-18 07:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:25:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:26:05
    [end_date_ymd] => 2025-03-18 07:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:26:05' and `end` < '2025-03-18 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-18 07:26:17] Production.INFO: count ==85  
[2025-03-18 07:26:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:26:05 - End Time 2025-03-18 07:26:05  
[2025-03-18 07:26:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706622', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706622', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706622', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:26:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706622', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:26:17] Production.INFO: ProcessCDR(1,14706622,1,1,2)  
[2025-03-18 07:26:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:26:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:26:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:26:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706622', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706622', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:26:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:26:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:26:22] Production.INFO: ==5009== Releasing lock...  
[2025-03-18 07:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:26:22] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:27:06
    [end_date_ymd] => 2025-03-18 07:27:06
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:27:06' and `end` < '2025-03-18 07: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-18 07:27:18] Production.INFO: count ==85  
[2025-03-18 07:27:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:27:06 - End Time 2025-03-18 07:27:06  
[2025-03-18 07:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706627', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706627', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706627', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706627', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:27:18] Production.INFO: ProcessCDR(1,14706627,1,1,2)  
[2025-03-18 07:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706627', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706627', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:27:21] Production.INFO: ==5088== Releasing lock...  
[2025-03-18 07:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:27:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:28:05
    [end_date_ymd] => 2025-03-18 07:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:28:05' and `end` < '2025-03-18 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-18 07:28:18] Production.INFO: count ==84  
[2025-03-18 07:28:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:28:05 - End Time 2025-03-18 07:28:05  
[2025-03-18 07:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706632', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706632', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706632', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706632', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:28:18] Production.INFO: ProcessCDR(1,14706632,1,1,2)  
[2025-03-18 07:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706632,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706632,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706632,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:28:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706632,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706632', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:28:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706632', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:28:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:28:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:28:21] Production.INFO: ==5201== Releasing lock...  
[2025-03-18 07:28:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:28:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:29:06
    [end_date_ymd] => 2025-03-18 07:29:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:29:06' and `end` < '2025-03-18 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-18 07:29:18] Production.INFO: count ==87  
[2025-03-18 07:29:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:29:06 - End Time 2025-03-18 07:29:06  
[2025-03-18 07:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706637', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706637', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:29:18] Production.INFO: ProcessCDR(1,14706637,1,1,2)  
[2025-03-18 07:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:29:21] Production.INFO: ==5277== Releasing lock...  
[2025-03-18 07:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:29:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:30:06
    [end_date_ymd] => 2025-03-18 07:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:30:06' and `end` < '2025-03-18 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-18 07:30:18] Production.INFO: count ==85  
[2025-03-18 07:30:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:30:06 - End Time 2025-03-18 07:30:06  
[2025-03-18 07:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706643', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706643', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706643', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706643', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:30:18] Production.INFO: ProcessCDR(1,14706643,1,1,2)  
[2025-03-18 07:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706643,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706643,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706643', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706643', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:30:22] Production.INFO: ==5359== Releasing lock...  
[2025-03-18 07:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:30:22] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:31:05
    [end_date_ymd] => 2025-03-18 07:31:05
    [RateCDR] => 1
)
  
[2025-03-18 07:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:31:05' and `end` < '2025-03-18 07:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:31:17] Production.INFO: count ==85  
[2025-03-18 07:31:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:31:05 - End Time 2025-03-18 07:31:05  
[2025-03-18 07:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706648', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706648', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706648', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706648', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:31:17] Production.INFO: ProcessCDR(1,14706648,1,1,2)  
[2025-03-18 07:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706648,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706648,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706648', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706648', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:31:21] Production.INFO: ==5433== Releasing lock...  
[2025-03-18 07:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:31:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:32:05
    [end_date_ymd] => 2025-03-18 07:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:32:05' and `end` < '2025-03-18 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-18 07:32:17] Production.INFO: count ==85  
[2025-03-18 07:32:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:32:05 - End Time 2025-03-18 07:32:05  
[2025-03-18 07:32:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706653', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706653', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706653', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:32:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706653', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:32:17] Production.INFO: ProcessCDR(1,14706653,1,1,2)  
[2025-03-18 07:32:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706653,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:32:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706653,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:32:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706653,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:32:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706653,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:32:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706653', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:32:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706653', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:32:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:32:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:32:20] Production.INFO: ==5508== Releasing lock...  
[2025-03-18 07:32:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:32:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:33:05
    [end_date_ymd] => 2025-03-18 07:33:05
    [RateCDR] => 1
)
  
[2025-03-18 07:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:33:05' and `end` < '2025-03-18 07:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:33:18] Production.INFO: count ==85  
[2025-03-18 07:33:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:33:05 - End Time 2025-03-18 07:33:05  
[2025-03-18 07:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706658', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706658', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706658', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706658', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:33:18] Production.INFO: ProcessCDR(1,14706658,1,1,2)  
[2025-03-18 07:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706658,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706658,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706658', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706658', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:33:21] Production.INFO: ==5582== Releasing lock...  
[2025-03-18 07:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:33:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:34:06
    [end_date_ymd] => 2025-03-18 07:34:06
    [RateCDR] => 1
)
  
[2025-03-18 07:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:34:06' and `end` < '2025-03-18 07:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:34:18] Production.INFO: count ==85  
[2025-03-18 07:34:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:34:06 - End Time 2025-03-18 07:34:06  
[2025-03-18 07:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706663', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706663', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706663', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706663', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:34:18] Production.INFO: ProcessCDR(1,14706663,1,1,2)  
[2025-03-18 07:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:34:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:34:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706663', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706663', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:34:21] Production.INFO: ==5659== Releasing lock...  
[2025-03-18 07:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:34:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:35:05
    [end_date_ymd] => 2025-03-18 07:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:35:05' and `end` < '2025-03-18 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-18 07:35:17] Production.INFO: count ==82  
[2025-03-18 07:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:35:05 - End Time 2025-03-18 07:35:05  
[2025-03-18 07:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706668', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706668', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706668', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706668', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:35:17] Production.INFO: ProcessCDR(1,14706668,1,1,2)  
[2025-03-18 07:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706668,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706668,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706668,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706668,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706668', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706668', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:35:21] Production.INFO: ==5734== Releasing lock...  
[2025-03-18 07:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:35:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:36:05
    [end_date_ymd] => 2025-03-18 07:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:36:05' and `end` < '2025-03-18 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-18 07:36:18] Production.INFO: count ==82  
[2025-03-18 07:36:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:36:05 - End Time 2025-03-18 07:36:05  
[2025-03-18 07:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706673', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706673', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706673', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706673', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:36:18] Production.INFO: ProcessCDR(1,14706673,1,1,2)  
[2025-03-18 07:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706673', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706673', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:36:21] Production.INFO: ==5809== Releasing lock...  
[2025-03-18 07:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:36:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:37:05
    [end_date_ymd] => 2025-03-18 07:37:05
    [RateCDR] => 1
)
  
[2025-03-18 07:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:37:05' and `end` < '2025-03-18 07:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:37:17] Production.INFO: count ==83  
[2025-03-18 07:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:37:05 - End Time 2025-03-18 07:37:05  
[2025-03-18 07:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706678', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706678', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706678', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706678', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:37:18] Production.INFO: ProcessCDR(1,14706678,1,1,2)  
[2025-03-18 07:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706678', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706678', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:37:21] Production.INFO: ==5883== Releasing lock...  
[2025-03-18 07:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:37:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:38:05
    [end_date_ymd] => 2025-03-18 07:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:38:05' and `end` < '2025-03-18 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-18 07:38:17] Production.INFO: count ==83  
[2025-03-18 07:38:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:38:05 - End Time 2025-03-18 07:38:05  
[2025-03-18 07:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706683', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706683', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:38:17] Production.INFO: ProcessCDR(1,14706683,1,1,2)  
[2025-03-18 07:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:38:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:38:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:38:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:38:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:38:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:38:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:38:20] Production.INFO: ==5961== Releasing lock...  
[2025-03-18 07:38:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:38:20] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:39:05
    [end_date_ymd] => 2025-03-18 07:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:39:05' and `end` < '2025-03-18 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-18 07:39:17] Production.INFO: count ==83  
[2025-03-18 07:39:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:39:05 - End Time 2025-03-18 07:39:05  
[2025-03-18 07:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706688', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706688', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:39:17] Production.INFO: ProcessCDR(1,14706688,1,1,2)  
[2025-03-18 07:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:39:21] Production.INFO: ==6035== Releasing lock...  
[2025-03-18 07:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:39:21] Production.INFO: 28.5 MB  #Memory Used#   
[2025-03-18 07:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:40:06
    [end_date_ymd] => 2025-03-18 07:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:40:06' and `end` < '2025-03-18 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-18 07:40:18] Production.INFO: count ==94  
[2025-03-18 07:40:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:40:06 - End Time 2025-03-18 07:40:06  
[2025-03-18 07:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706694', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706694', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706694', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706694', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:40:18] Production.INFO: ProcessCDR(1,14706694,1,1,2)  
[2025-03-18 07:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:40:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:40:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706694', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706694', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:40:22] Production.INFO: ==6113== Releasing lock...  
[2025-03-18 07:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:40:22] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:41:05
    [end_date_ymd] => 2025-03-18 07:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:41:05' and `end` < '2025-03-18 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-18 07:41:17] Production.INFO: count ==94  
[2025-03-18 07:41:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:41:05 - End Time 2025-03-18 07:41:05  
[2025-03-18 07:41:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706699', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706699', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706699', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:41:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706699', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:41:17] Production.INFO: ProcessCDR(1,14706699,1,1,2)  
[2025-03-18 07:41:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:41:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706699,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:41:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:41:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706699,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706699', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:41:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706699', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:41:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:41:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:41:20] Production.INFO: ==6190== Releasing lock...  
[2025-03-18 07:41:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:41:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:42:05
    [end_date_ymd] => 2025-03-18 07:42:05
    [RateCDR] => 1
)
  
[2025-03-18 07:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:42:05' and `end` < '2025-03-18 07:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:42:17] Production.INFO: count ==94  
[2025-03-18 07:42:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:42:05 - End Time 2025-03-18 07:42:05  
[2025-03-18 07:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706704', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706704', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706704', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706704', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:42:17] Production.INFO: ProcessCDR(1,14706704,1,1,2)  
[2025-03-18 07:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706704,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706704,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706704', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706704', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:42:21] Production.INFO: ==6265== Releasing lock...  
[2025-03-18 07:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:42:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:43:05
    [end_date_ymd] => 2025-03-18 07:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:43:05' and `end` < '2025-03-18 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-18 07:43:17] Production.INFO: count ==94  
[2025-03-18 07:43:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:43:05 - End Time 2025-03-18 07:43:05  
[2025-03-18 07:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706709', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706709', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706709', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706709', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:43:17] Production.INFO: ProcessCDR(1,14706709,1,1,2)  
[2025-03-18 07:43:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:43:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706709,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:43:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:43:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706709,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706709', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:43:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706709', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:43:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:43:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:43:20] Production.INFO: ==6339== Releasing lock...  
[2025-03-18 07:43:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:43:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:44:05
    [end_date_ymd] => 2025-03-18 07:44:05
    [RateCDR] => 1
)
  
[2025-03-18 07:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:44:05' and `end` < '2025-03-18 07:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:44:17] Production.INFO: count ==95  
[2025-03-18 07:44:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:44:05 - End Time 2025-03-18 07:44:05  
[2025-03-18 07:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706714', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706714', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706714', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706714', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:44:17] Production.INFO: ProcessCDR(1,14706714,1,1,2)  
[2025-03-18 07:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:44:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:44:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706714', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706714', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:44:21] Production.INFO: ==6450== Releasing lock...  
[2025-03-18 07:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:44:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:45:05
    [end_date_ymd] => 2025-03-18 07:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:45:05' and `end` < '2025-03-18 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-18 07:45:17] Production.INFO: count ==103  
[2025-03-18 07:45:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:45:05 - End Time 2025-03-18 07:45:05  
[2025-03-18 07:45:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706719', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706719', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706719', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:45:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706719', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:45:17] Production.INFO: ProcessCDR(1,14706719,1,1,2)  
[2025-03-18 07:45:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706719,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:45:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706719,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:45:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706719,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:45:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706719,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706719', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:45:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706719', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:45:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:45:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:45:20] Production.INFO: ==6528== Releasing lock...  
[2025-03-18 07:45:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:45:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:46:05
    [end_date_ymd] => 2025-03-18 07:46:05
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:46:05' and `end` < '2025-03-18 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-18 07:46:17] Production.INFO: count ==103  
[2025-03-18 07:46:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:46:05 - End Time 2025-03-18 07:46:05  
[2025-03-18 07:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706724', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706724', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706724', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706724', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:46:17] Production.INFO: ProcessCDR(1,14706724,1,1,2)  
[2025-03-18 07:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706724,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706724,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706724,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706724,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706724', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706724', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:46:21] Production.INFO: ==6603== Releasing lock...  
[2025-03-18 07:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:46:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:47:06
    [end_date_ymd] => 2025-03-18 07:47:06
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:47:06' and `end` < '2025-03-18 07: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-18 07:47:18] Production.INFO: count ==103  
[2025-03-18 07:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:47:06 - End Time 2025-03-18 07:47:06  
[2025-03-18 07:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706729', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706729', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706729', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706729', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:47:18] Production.INFO: ProcessCDR(1,14706729,1,1,2)  
[2025-03-18 07:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706729,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706729,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706729,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706729,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706729', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706729', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:47:21] Production.INFO: ==6674== Releasing lock...  
[2025-03-18 07:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:47:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:48:05
    [end_date_ymd] => 2025-03-18 07:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:48:05' and `end` < '2025-03-18 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-18 07:48:17] Production.INFO: count ==104  
[2025-03-18 07:48:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:48:05 - End Time 2025-03-18 07:48:05  
[2025-03-18 07:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706734', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706734', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706734', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706734', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:48:17] Production.INFO: ProcessCDR(1,14706734,1,1,2)  
[2025-03-18 07:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706734,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706734,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706734,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:48:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706734,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706734', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:48:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706734', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:48:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:48:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:48:20] Production.INFO: ==6745== Releasing lock...  
[2025-03-18 07:48:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:48:20] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:49:06
    [end_date_ymd] => 2025-03-18 07:49:06
    [RateCDR] => 1
)
  
[2025-03-18 07:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:49:06' and `end` < '2025-03-18 07:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:49:18] Production.INFO: count ==107  
[2025-03-18 07:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:49:06 - End Time 2025-03-18 07:49:06  
[2025-03-18 07:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706739', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706739', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706739', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706739', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:49:18] Production.INFO: ProcessCDR(1,14706739,1,1,2)  
[2025-03-18 07:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706739,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706739,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706739,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706739,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706739', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706739', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:49:21] Production.INFO: ==6818== Releasing lock...  
[2025-03-18 07:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:49:21] Production.INFO: 28.75 MB  #Memory Used#   
[2025-03-18 07:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:50:06
    [end_date_ymd] => 2025-03-18 07:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:50:06' and `end` < '2025-03-18 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-18 07:50:18] Production.INFO: count ==122  
[2025-03-18 07:50:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:50:06 - End Time 2025-03-18 07:50:06  
[2025-03-18 07:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706745', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706745', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706745', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706745', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:50:18] Production.INFO: ProcessCDR(1,14706745,1,1,2)  
[2025-03-18 07:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706745,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706745,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706745', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706745', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:50:22] Production.INFO: ==6895== Releasing lock...  
[2025-03-18 07:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:50:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:51:06
    [end_date_ymd] => 2025-03-18 07:51:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:51:06' and `end` < '2025-03-18 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-18 07:51:18] Production.INFO: count ==122  
[2025-03-18 07:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:51:06 - End Time 2025-03-18 07:51:06  
[2025-03-18 07:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706750', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706750', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706750', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706750', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:51:18] Production.INFO: ProcessCDR(1,14706750,1,1,2)  
[2025-03-18 07:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706750,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706750,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706750', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706750', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:51:21] Production.INFO: ==6972== Releasing lock...  
[2025-03-18 07:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:51:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:52:05
    [end_date_ymd] => 2025-03-18 07:52:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:52:05' and `end` < '2025-03-18 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-18 07:52:17] Production.INFO: count ==127  
[2025-03-18 07:52:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:52:05 - End Time 2025-03-18 07:52:05  
[2025-03-18 07:52:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706755', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706755', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706755', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:52:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706755', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:52:17] Production.INFO: ProcessCDR(1,14706755,1,1,2)  
[2025-03-18 07:52:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:52:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706755,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:52:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:52:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706755,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706755', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:52:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706755', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:52:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:52:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:52:20] Production.INFO: ==7043== Releasing lock...  
[2025-03-18 07:52:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:52:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:53:05
    [end_date_ymd] => 2025-03-18 07:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:53:05' and `end` < '2025-03-18 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-18 07:53:17] Production.INFO: count ==127  
[2025-03-18 07:53:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:53:05 - End Time 2025-03-18 07:53:05  
[2025-03-18 07:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706760', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706760', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706760', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706760', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:53:17] Production.INFO: ProcessCDR(1,14706760,1,1,2)  
[2025-03-18 07:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706760,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706760,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706760', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706760', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:53:21] Production.INFO: ==7116== Releasing lock...  
[2025-03-18 07:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:53:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:54:05
    [end_date_ymd] => 2025-03-18 07:54:05
    [RateCDR] => 1
)
  
[2025-03-18 07:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:54:05' and `end` < '2025-03-18 07:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:54:18] Production.INFO: count ==130  
[2025-03-18 07:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:54:05 - End Time 2025-03-18 07:54:05  
[2025-03-18 07:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706765', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706765', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706765', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706765', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:54:18] Production.INFO: ProcessCDR(1,14706765,1,1,2)  
[2025-03-18 07:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706765,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706765,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706765', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706765', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:54:21] Production.INFO: ==7187== Releasing lock...  
[2025-03-18 07:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:54:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:55:05
    [end_date_ymd] => 2025-03-18 07:55:05
    [RateCDR] => 1
)
  
[2025-03-18 07:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:55:05' and `end` < '2025-03-18 07:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:55:17] Production.INFO: count ==130  
[2025-03-18 07:55:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:55:05 - End Time 2025-03-18 07:55:05  
[2025-03-18 07:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706770', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706770', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706770', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706770', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:55:17] Production.INFO: ProcessCDR(1,14706770,1,1,2)  
[2025-03-18 07:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:55:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:55:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:55:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706770', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:55:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706770', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:55:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:55:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:55:20] Production.INFO: ==7258== Releasing lock...  
[2025-03-18 07:55:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:55:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:56:05
    [end_date_ymd] => 2025-03-18 07:56:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 04:56:05' and `end` < '2025-03-18 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-18 07:56:18] Production.INFO: count ==130  
[2025-03-18 07:56:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:56:05 - End Time 2025-03-18 07:56:05  
[2025-03-18 07:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706775', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706775', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706775', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706775', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:56:18] Production.INFO: ProcessCDR(1,14706775,1,1,2)  
[2025-03-18 07:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706775,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706775,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706775,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706775,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706775', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706775', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:56:21] Production.INFO: ==7331== Releasing lock...  
[2025-03-18 07:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:56:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:57:05
    [end_date_ymd] => 2025-03-18 07:57:05
    [RateCDR] => 1
)
  
[2025-03-18 07:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:57:05' and `end` < '2025-03-18 07:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:57:17] Production.INFO: count ==133  
[2025-03-18 07:57:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:57:05 - End Time 2025-03-18 07:57:05  
[2025-03-18 07:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706780', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706780', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706780', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706780', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:57:17] Production.INFO: ProcessCDR(1,14706780,1,1,2)  
[2025-03-18 07:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706780,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706780,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706780,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:57:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706780,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706780', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706780', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:57:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:57:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:57:20] Production.INFO: ==7401== Releasing lock...  
[2025-03-18 07:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:57:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:58:06
    [end_date_ymd] => 2025-03-18 07:58:06
    [RateCDR] => 1
)
  
[2025-03-18 07:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 04:58:06' and `end` < '2025-03-18 07:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 07:58:18] Production.INFO: count ==133  
[2025-03-18 07:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 04:58:06 - End Time 2025-03-18 07:58:06  
[2025-03-18 07:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706785', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706785', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706785', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706785', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:58:18] Production.INFO: ProcessCDR(1,14706785,1,1,2)  
[2025-03-18 07:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706785', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706785', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:58:22] Production.INFO: ==7476== Releasing lock...  
[2025-03-18 07:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:58:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 07:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 04:59:05
    [end_date_ymd] => 2025-03-18 07:59:05
    [RateCDR] => 1
)
  
[2025-03-18 07: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-18 04:59:05' and `end` < '2025-03-18 07: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-18 07:59:17] Production.INFO: count ==133  
[2025-03-18 07:59:17] Production.ERROR: pbx CDR StartTime 2025-03-18 04:59:05 - End Time 2025-03-18 07:59:05  
[2025-03-18 07:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 07:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706790', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706790', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706790', 'tblTempVendorCDR_20' ) start  
[2025-03-18 07:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706790', 'tblTempVendorCDR_20' ) end  
[2025-03-18 07:59:17] Production.INFO: ProcessCDR(1,14706790,1,1,2)  
[2025-03-18 07:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706790,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:59:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706790,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 07:59:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706790,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:59:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706790,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 07:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706790', 'tblTempUsageDetail_20' ) start  
[2025-03-18 07:59:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706790', 'tblTempUsageDetail_20' ) end  
[2025-03-18 07:59:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 07:59:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 07:59:20] Production.INFO: ==7586== Releasing lock...  
[2025-03-18 07:59:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 07:59:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:00:06
    [end_date_ymd] => 2025-03-18 08:00:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:00:06' and `end` < '2025-03-18 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-18 08:00:18] Production.INFO: count ==133  
[2025-03-18 08:00:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:00:06 - End Time 2025-03-18 08:00:06  
[2025-03-18 08:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706796', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706796', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706796', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706796', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:00:18] Production.INFO: ProcessCDR(1,14706796,1,1,2)  
[2025-03-18 08:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:00:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706796,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:00:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706796,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706796', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706796', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:00:22] Production.INFO: ==7662== Releasing lock...  
[2025-03-18 08:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:00:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:01:05
    [end_date_ymd] => 2025-03-18 08:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:01:05' and `end` < '2025-03-18 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-18 08:01:17] Production.INFO: count ==135  
[2025-03-18 08:01:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:01:05 - End Time 2025-03-18 08:01:05  
[2025-03-18 08:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706801', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706801', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706801', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706801', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:01:17] Production.INFO: ProcessCDR(1,14706801,1,1,2)  
[2025-03-18 08:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706801,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:01:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706801,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706801', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:01:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706801', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:01:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:01:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:01:21] Production.INFO: ==7747== Releasing lock...  
[2025-03-18 08:01:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:01:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:02:05
    [end_date_ymd] => 2025-03-18 08:02:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:02:05' and `end` < '2025-03-18 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-18 08:02:17] Production.INFO: count ==134  
[2025-03-18 08:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:02:05 - End Time 2025-03-18 08:02:05  
[2025-03-18 08:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706806', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706806', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706806', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706806', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:02:18] Production.INFO: ProcessCDR(1,14706806,1,1,2)  
[2025-03-18 08:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:02:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706806,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:02:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:02:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706806,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706806', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:02:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706806', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:02:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:02:22] Production.INFO: ==7821== Releasing lock...  
[2025-03-18 08:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:02:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:03:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:03:04
    [end_date_ymd] => 2025-03-18 08:03:04
    [RateCDR] => 1
)
  
[2025-03-18 08:03:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:03:04' and `end` < '2025-03-18 08:03:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:03:17] Production.INFO: count ==134  
[2025-03-18 08:03:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:03:04 - End Time 2025-03-18 08:03:04  
[2025-03-18 08:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706811', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706811', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706811', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706811', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:03:17] Production.INFO: ProcessCDR(1,14706811,1,1,2)  
[2025-03-18 08:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:03:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706811,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:03:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:03:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706811,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706811', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:03:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706811', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:03:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:03:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:03:20] Production.INFO: ==7893== Releasing lock...  
[2025-03-18 08:03:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:03:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:04:06
    [end_date_ymd] => 2025-03-18 08:04:06
    [RateCDR] => 1
)
  
[2025-03-18 08: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-18 05:04:06' and `end` < '2025-03-18 08: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-18 08:04:18] Production.INFO: count ==136  
[2025-03-18 08:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:04:06 - End Time 2025-03-18 08:04:06  
[2025-03-18 08:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706816', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706816', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706816', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706816', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:04:18] Production.INFO: ProcessCDR(1,14706816,1,1,2)  
[2025-03-18 08:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706816,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706816,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706816', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706816', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:04:22] Production.INFO: ==7970== Releasing lock...  
[2025-03-18 08:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:04:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:05:05
    [end_date_ymd] => 2025-03-18 08:05:05
    [RateCDR] => 1
)
  
[2025-03-18 08:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:05:05' and `end` < '2025-03-18 08:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:05:17] Production.INFO: count ==133  
[2025-03-18 08:05:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:05:05 - End Time 2025-03-18 08:05:05  
[2025-03-18 08:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706821', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706821', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706821', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706821', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:05:17] Production.INFO: ProcessCDR(1,14706821,1,1,2)  
[2025-03-18 08:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:05:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:05:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:05:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706821', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:05:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706821', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:05:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:05:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:05:20] Production.INFO: ==8045== Releasing lock...  
[2025-03-18 08:05:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:05:20] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:06:05
    [end_date_ymd] => 2025-03-18 08:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:06:05' and `end` < '2025-03-18 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-18 08:06:18] Production.INFO: count ==133  
[2025-03-18 08:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:06:05 - End Time 2025-03-18 08:06:05  
[2025-03-18 08:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706826', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706826', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706826', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706826', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:06:18] Production.INFO: ProcessCDR(1,14706826,1,1,2)  
[2025-03-18 08:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706826,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706826,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706826,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706826,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706826', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706826', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:06:21] Production.INFO: ==8119== Releasing lock...  
[2025-03-18 08:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:06:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:07:05
    [end_date_ymd] => 2025-03-18 08:07:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:07:05' and `end` < '2025-03-18 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-18 08:07:17] Production.INFO: count ==140  
[2025-03-18 08:07:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:07:05 - End Time 2025-03-18 08:07:05  
[2025-03-18 08:07:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706831', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706831', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706831', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:07:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706831', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:07:17] Production.INFO: ProcessCDR(1,14706831,1,1,2)  
[2025-03-18 08:07:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706831,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706831,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706831,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706831,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706831', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706831', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:07:22] Production.INFO: ==8191== Releasing lock...  
[2025-03-18 08:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:07:22] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:08:05
    [end_date_ymd] => 2025-03-18 08:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:08:05' and `end` < '2025-03-18 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-18 08:08:17] Production.INFO: count ==143  
[2025-03-18 08:08:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:08:05 - End Time 2025-03-18 08:08:05  
[2025-03-18 08:08:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706836', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706836', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706836', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:08:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706836', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:08:17] Production.INFO: ProcessCDR(1,14706836,1,1,2)  
[2025-03-18 08:08:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706836,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:08:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706836,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:08:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706836,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:08:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706836,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706836', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:08:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706836', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:08:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:08:21] Production.INFO: ==8270== Releasing lock...  
[2025-03-18 08:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:08:21] Production.INFO: 29.25 MB  #Memory Used#   
[2025-03-18 08:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:09:05
    [end_date_ymd] => 2025-03-18 08:09:05
    [RateCDR] => 1
)
  
[2025-03-18 08:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:09:05' and `end` < '2025-03-18 08:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:09:17] Production.INFO: count ==148  
[2025-03-18 08:09:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:09:05 - End Time 2025-03-18 08:09:05  
[2025-03-18 08:09:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706841', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706841', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706841', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:09:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706841', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:09:17] Production.INFO: ProcessCDR(1,14706841,1,1,2)  
[2025-03-18 08:09:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:09:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:09:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:09:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706841', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:09:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706841', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:09:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:09:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:09:20] Production.INFO: ==8345== Releasing lock...  
[2025-03-18 08:09:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:09:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 08:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:10:06
    [end_date_ymd] => 2025-03-18 08:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:10:06' and `end` < '2025-03-18 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-18 08:10:18] Production.INFO: count ==162  
[2025-03-18 08:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:10:06 - End Time 2025-03-18 08:10:06  
[2025-03-18 08:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706847', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706847', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706847', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706847', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:10:18] Production.INFO: ProcessCDR(1,14706847,1,1,2)  
[2025-03-18 08:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706847,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:10:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706847,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706847', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:10:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706847', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:10:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:10:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:10:22] Production.INFO: ==8425== Releasing lock...  
[2025-03-18 08:10:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:10:22] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 08:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:11:05
    [end_date_ymd] => 2025-03-18 08:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:11:05' and `end` < '2025-03-18 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-18 08:11:17] Production.INFO: count ==187  
[2025-03-18 08:11:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:11:05 - End Time 2025-03-18 08:11:05  
[2025-03-18 08:11:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706852', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706852', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706852', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:11:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706852', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:11:17] Production.INFO: ProcessCDR(1,14706852,1,1,2)  
[2025-03-18 08:11:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:11:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706852,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:11:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:11:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706852,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706852', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:11:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706852', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:11:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:11:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:11:20] Production.INFO: ==8505== Releasing lock...  
[2025-03-18 08:11:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:11:20] Production.INFO: 29.5 MB  #Memory Used#   
[2025-03-18 08:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:12:05
    [end_date_ymd] => 2025-03-18 08:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:12:05' and `end` < '2025-03-18 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-18 08:12:17] Production.INFO: count ==190  
[2025-03-18 08:12:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:12:05 - End Time 2025-03-18 08:12:05  
[2025-03-18 08:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706857', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706857', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706857', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706857', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:12:17] Production.INFO: ProcessCDR(1,14706857,1,1,2)  
[2025-03-18 08:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706857,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706857,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706857', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706857', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:12:21] Production.INFO: ==8581== Releasing lock...  
[2025-03-18 08:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:12:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-03-18 08:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:13:05
    [end_date_ymd] => 2025-03-18 08:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:13:05' and `end` < '2025-03-18 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-18 08:13:18] Production.INFO: count ==193  
[2025-03-18 08:13:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:13:05 - End Time 2025-03-18 08:13:05  
[2025-03-18 08:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706862', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706862', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706862', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706862', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:13:18] Production.INFO: ProcessCDR(1,14706862,1,1,2)  
[2025-03-18 08:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706862,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706862,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706862', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706862', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:13:21] Production.INFO: ==8652== Releasing lock...  
[2025-03-18 08:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:13:21] Production.INFO: 29.75 MB  #Memory Used#   
[2025-03-18 08:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:14:05
    [end_date_ymd] => 2025-03-18 08:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:14:05' and `end` < '2025-03-18 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-18 08:14:17] Production.INFO: count ==200  
[2025-03-18 08:14:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:14:05 - End Time 2025-03-18 08:14:05  
[2025-03-18 08:14:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706867', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706867', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706867', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:14:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706867', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:14:17] Production.INFO: ProcessCDR(1,14706867,1,1,2)  
[2025-03-18 08:14:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:14:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:14:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706867', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706867', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:14:21] Production.INFO: ==8763== Releasing lock...  
[2025-03-18 08:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:14:21] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 08:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:15:05
    [end_date_ymd] => 2025-03-18 08:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:15:05' and `end` < '2025-03-18 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-18 08:15:17] Production.INFO: count ==206  
[2025-03-18 08:15:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:15:05 - End Time 2025-03-18 08:15:05  
[2025-03-18 08:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706872', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706872', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706872', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706872', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:15:17] Production.INFO: ProcessCDR(1,14706872,1,1,2)  
[2025-03-18 08:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:15:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:15:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706872', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706872', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:15:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:15:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:15:22] Production.INFO: ==8837== Releasing lock...  
[2025-03-18 08:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:15:22] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 08:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:16:05
    [end_date_ymd] => 2025-03-18 08:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:16:05' and `end` < '2025-03-18 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-18 08:16:17] Production.INFO: count ==215  
[2025-03-18 08:16:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:16:05 - End Time 2025-03-18 08:16:05  
[2025-03-18 08:16:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706877', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706877', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706877', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:16:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706877', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:16:17] Production.INFO: ProcessCDR(1,14706877,1,1,2)  
[2025-03-18 08:16:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706877,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:16:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706877,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:16:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706877,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:16:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706877,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706877', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:16:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706877', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:16:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:16:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:16:20] Production.INFO: ==8906== Releasing lock...  
[2025-03-18 08:16:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:16:20] Production.INFO: 30 MB  #Memory Used#   
[2025-03-18 08:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:17:05
    [end_date_ymd] => 2025-03-18 08:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:17:05' and `end` < '2025-03-18 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-18 08:17:17] Production.INFO: count ==221  
[2025-03-18 08:17:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:17:05 - End Time 2025-03-18 08:17:05  
[2025-03-18 08:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706882', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706882', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706882', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706882', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:17:17] Production.INFO: ProcessCDR(1,14706882,1,1,2)  
[2025-03-18 08:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706882,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706882,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706882,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:17:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706882,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706882', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:17:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706882', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:17:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:17:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:17:20] Production.INFO: ==8983== Releasing lock...  
[2025-03-18 08:17:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:17:20] Production.INFO: 29.75 MB  #Memory Used#   
[2025-03-18 08:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:18:05
    [end_date_ymd] => 2025-03-18 08:18:05
    [RateCDR] => 1
)
  
[2025-03-18 08:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:18:05' and `end` < '2025-03-18 08:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:18:17] Production.INFO: count ==222  
[2025-03-18 08:18:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:18:05 - End Time 2025-03-18 08:18:05  
[2025-03-18 08:18:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706887', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706887', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706887', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:18:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706887', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:18:17] Production.INFO: ProcessCDR(1,14706887,1,1,2)  
[2025-03-18 08:18:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706887', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706887', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:18:22] Production.INFO: ==9057== Releasing lock...  
[2025-03-18 08:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:18:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 08:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:19:05
    [end_date_ymd] => 2025-03-18 08:19:05
    [RateCDR] => 1
)
  
[2025-03-18 08:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:19:05' and `end` < '2025-03-18 08:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:19:17] Production.INFO: count ==224  
[2025-03-18 08:19:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:19:05 - End Time 2025-03-18 08:19:05  
[2025-03-18 08:19:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706892', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706892', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706892', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:19:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706892', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:19:17] Production.INFO: ProcessCDR(1,14706892,1,1,2)  
[2025-03-18 08:19:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706892,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:19:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706892,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:19:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706892,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:19:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706892,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706892', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:19:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706892', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:19:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:19:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:19:22] Production.INFO: ==9131== Releasing lock...  
[2025-03-18 08:19:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:19:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 08:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:20:06
    [end_date_ymd] => 2025-03-18 08:20:06
    [RateCDR] => 1
)
  
[2025-03-18 08:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:20:06' and `end` < '2025-03-18 08:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:20:18] Production.INFO: count ==240  
[2025-03-18 08:20:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:20:06 - End Time 2025-03-18 08:20:06  
[2025-03-18 08:20:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706897', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706897', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706897', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:20:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706897', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:20:18] Production.INFO: ProcessCDR(1,14706897,1,1,2)  
[2025-03-18 08:20:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706897,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706897,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706897,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:20:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706897,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706897', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706897', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:20:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:20:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:20:23] Production.INFO: ==9207== Releasing lock...  
[2025-03-18 08:20:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:20:23] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 08:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:21:05
    [end_date_ymd] => 2025-03-18 08:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:21:05' and `end` < '2025-03-18 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-18 08:21:17] Production.INFO: count ==287  
[2025-03-18 08:21:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:21:05 - End Time 2025-03-18 08:21:05  
[2025-03-18 08:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706903', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706903', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706903', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706903', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:21:17] Production.INFO: ProcessCDR(1,14706903,1,1,2)  
[2025-03-18 08:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706903,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706903,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706903', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706903', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:21:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:21:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:21:22] Production.INFO: ==9281== Releasing lock...  
[2025-03-18 08:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:21:22] Production.INFO: 30.25 MB  #Memory Used#   
[2025-03-18 08:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:22:06
    [end_date_ymd] => 2025-03-18 08:22:06
    [RateCDR] => 1
)
  
[2025-03-18 08:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:22:06' and `end` < '2025-03-18 08:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:22:18] Production.INFO: count ==304  
[2025-03-18 08:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:22:06 - End Time 2025-03-18 08:22:06  
[2025-03-18 08:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706908', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706908', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706908', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706908', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:22:18] Production.INFO: ProcessCDR(1,14706908,1,1,2)  
[2025-03-18 08:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706908,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706908,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706908', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706908', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:22:22] Production.INFO: ==9354== Releasing lock...  
[2025-03-18 08:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:22:22] Production.INFO: 30.5 MB  #Memory Used#   
[2025-03-18 08:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:23:05
    [end_date_ymd] => 2025-03-18 08:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:23:05' and `end` < '2025-03-18 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-18 08:23:17] Production.INFO: count ==313  
[2025-03-18 08:23:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:23:05 - End Time 2025-03-18 08:23:05  
[2025-03-18 08:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706913', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706913', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706913', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706913', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:23:17] Production.INFO: ProcessCDR(1,14706913,1,1,2)  
[2025-03-18 08:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:23:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706913,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:23:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:23:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706913,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706913', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706913', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:23:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:23:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:23:23] Production.INFO: ==9425== Releasing lock...  
[2025-03-18 08:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:23:23] Production.INFO: 30.75 MB  #Memory Used#   
[2025-03-18 08:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:24:06
    [end_date_ymd] => 2025-03-18 08:24:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:24:06' and `end` < '2025-03-18 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-18 08:24:18] Production.INFO: count ==320  
[2025-03-18 08:24:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:24:06 - End Time 2025-03-18 08:24:06  
[2025-03-18 08:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706918', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706918', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706918', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706918', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:24:18] Production.INFO: ProcessCDR(1,14706918,1,1,2)  
[2025-03-18 08:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706918', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706918', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:24:22] Production.INFO: ==9504== Releasing lock...  
[2025-03-18 08:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:24:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 08:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:25:05
    [end_date_ymd] => 2025-03-18 08:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:25:05' and `end` < '2025-03-18 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-18 08:25:17] Production.INFO: count ==346  
[2025-03-18 08:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:25:05 - End Time 2025-03-18 08:25:05  
[2025-03-18 08:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706923', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706923', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706923', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706923', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:25:17] Production.INFO: ProcessCDR(1,14706923,1,1,2)  
[2025-03-18 08:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:25:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:25:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:25:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706923', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706923', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:25:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:25:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:25:23] Production.INFO: ==9577== Releasing lock...  
[2025-03-18 08:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:25:23] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 08:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:26:05
    [end_date_ymd] => 2025-03-18 08:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:26:05' and `end` < '2025-03-18 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-18 08:26:18] Production.INFO: count ==358  
[2025-03-18 08:26:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:26:05 - End Time 2025-03-18 08:26:05  
[2025-03-18 08:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706928', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706928', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706928', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706928', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:26:18] Production.INFO: ProcessCDR(1,14706928,1,1,2)  
[2025-03-18 08:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706928,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706928,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706928,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706928,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706928', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706928', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:26:21] Production.INFO: ==9649== Releasing lock...  
[2025-03-18 08:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:26:21] Production.INFO: 31.5 MB  #Memory Used#   
[2025-03-18 08:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:27:05
    [end_date_ymd] => 2025-03-18 08:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:27:05' and `end` < '2025-03-18 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-18 08:27:17] Production.INFO: count ==365  
[2025-03-18 08:27:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:27:05 - End Time 2025-03-18 08:27:05  
[2025-03-18 08:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706933', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706933', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706933', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706933', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:27:17] Production.INFO: ProcessCDR(1,14706933,1,1,2)  
[2025-03-18 08:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706933,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:27:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706933,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:27:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706933,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:27:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706933,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706933', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:27:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706933', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:27:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:27:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:27:22] Production.INFO: ==9722== Releasing lock...  
[2025-03-18 08:27:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:27:22] Production.INFO: 31 MB  #Memory Used#   
[2025-03-18 08:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:28:06
    [end_date_ymd] => 2025-03-18 08:28:06
    [RateCDR] => 1
)
  
[2025-03-18 08: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-18 05:28:06' and `end` < '2025-03-18 08: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-18 08:28:18] Production.INFO: count ==379  
[2025-03-18 08:28:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:28:06 - End Time 2025-03-18 08:28:06  
[2025-03-18 08:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706938', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706938', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706938', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706938', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:28:18] Production.INFO: ProcessCDR(1,14706938,1,1,2)  
[2025-03-18 08:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706938,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:28:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706938,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:28:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706938,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:28:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706938,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706938', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706938', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:28:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:28:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:28:23] Production.INFO: ==9797== Releasing lock...  
[2025-03-18 08:28:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:28:23] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 08:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:29:05
    [end_date_ymd] => 2025-03-18 08:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:29:05' and `end` < '2025-03-18 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-18 08:29:17] Production.INFO: count ==386  
[2025-03-18 08:29:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:29:05 - End Time 2025-03-18 08:29:05  
[2025-03-18 08:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706943', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706943', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706943', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706943', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:29:17] Production.INFO: ProcessCDR(1,14706943,1,1,2)  
[2025-03-18 08:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706943,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:29:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706943,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:29:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706943,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:29:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706943,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:29:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706943', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:29:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706943', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:29:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:29:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:29:22] Production.INFO: ==9867== Releasing lock...  
[2025-03-18 08:29:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:29:22] Production.INFO: 31.25 MB  #Memory Used#   
[2025-03-18 08:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:30:06
    [end_date_ymd] => 2025-03-18 08:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:30:06' and `end` < '2025-03-18 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-18 08:30:18] Production.INFO: count ==399  
[2025-03-18 08:30:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:30:06 - End Time 2025-03-18 08:30:06  
[2025-03-18 08:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706949', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706949', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706949', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706949', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:30:18] Production.INFO: ProcessCDR(1,14706949,1,1,2)  
[2025-03-18 08:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:30:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706949,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:30:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:30:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706949,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:30:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706949', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:30:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706949', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:30:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:30:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:30:23] Production.INFO: ==9985== Releasing lock...  
[2025-03-18 08:30:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:30:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 08:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:31:05
    [end_date_ymd] => 2025-03-18 08:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:31:05' and `end` < '2025-03-18 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-18 08:31:17] Production.INFO: count ==420  
[2025-03-18 08:31:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:31:05 - End Time 2025-03-18 08:31:05  
[2025-03-18 08:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706954', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706954', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706954', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706954', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:31:17] Production.INFO: ProcessCDR(1,14706954,1,1,2)  
[2025-03-18 08:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706954,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:31:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706954,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:31:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706954,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706954,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706954', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706954', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:31:21] Production.INFO: ==10061== Releasing lock...  
[2025-03-18 08:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:31:21] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 08:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:32:06
    [end_date_ymd] => 2025-03-18 08:32:06
    [RateCDR] => 1
)
  
[2025-03-18 08: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-18 05:32:06' and `end` < '2025-03-18 08: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-18 08:32:18] Production.INFO: count ==421  
[2025-03-18 08:32:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:32:06 - End Time 2025-03-18 08:32:06  
[2025-03-18 08:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706959', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706959', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706959', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706959', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:32:18] Production.INFO: ProcessCDR(1,14706959,1,1,2)  
[2025-03-18 08:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:32:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706959,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:32:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:32:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706959,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706959', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706959', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:32:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:32:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:32:24] Production.INFO: ==10136== Releasing lock...  
[2025-03-18 08:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:32:24] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 08:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:33:05
    [end_date_ymd] => 2025-03-18 08:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:33:05' and `end` < '2025-03-18 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-18 08:33:17] Production.INFO: count ==429  
[2025-03-18 08:33:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:33:05 - End Time 2025-03-18 08:33:05  
[2025-03-18 08:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706964', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706964', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706964', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706964', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:33:17] Production.INFO: ProcessCDR(1,14706964,1,1,2)  
[2025-03-18 08:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:33:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706964,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:33:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:33:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706964,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:33:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706964', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:33:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706964', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:33:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:33:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:33:23] Production.INFO: ==10208== Releasing lock...  
[2025-03-18 08:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:33:23] Production.INFO: 32 MB  #Memory Used#   
[2025-03-18 08:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:34:05
    [end_date_ymd] => 2025-03-18 08:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:34:05' and `end` < '2025-03-18 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-18 08:34:17] Production.INFO: count ==438  
[2025-03-18 08:34:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:34:05 - End Time 2025-03-18 08:34:05  
[2025-03-18 08:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706969', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706969', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706969', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706969', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:34:17] Production.INFO: ProcessCDR(1,14706969,1,1,2)  
[2025-03-18 08:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:34:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:34:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:34:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706969', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706969', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:34:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:34:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:34:23] Production.INFO: ==10283== Releasing lock...  
[2025-03-18 08:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:34:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 08:35:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:35:04
    [end_date_ymd] => 2025-03-18 08:35:04
    [RateCDR] => 1
)
  
[2025-03-18 08:35:04] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:35:04' and `end` < '2025-03-18 08:35:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:35:17] Production.INFO: count ==438  
[2025-03-18 08:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:35:04 - End Time 2025-03-18 08:35:04  
[2025-03-18 08:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706974', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706974', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706974', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706974', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:35:17] Production.INFO: ProcessCDR(1,14706974,1,1,2)  
[2025-03-18 08:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706974', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706974', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:35:20] Production.INFO: ==10356== Releasing lock...  
[2025-03-18 08:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:35:20] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 08:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:36:06
    [end_date_ymd] => 2025-03-18 08:36:06
    [RateCDR] => 1
)
  
[2025-03-18 08:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:36:06' and `end` < '2025-03-18 08:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:36:18] Production.INFO: count ==440  
[2025-03-18 08:36:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:36:06 - End Time 2025-03-18 08:36:06  
[2025-03-18 08:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706979', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706979', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706979', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706979', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:36:18] Production.INFO: ProcessCDR(1,14706979,1,1,2)  
[2025-03-18 08:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:36:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:36:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706979', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706979', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:36:23] Production.INFO: ==10427== Releasing lock...  
[2025-03-18 08:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:36:23] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 08:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:37:05
    [end_date_ymd] => 2025-03-18 08:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:37:05' and `end` < '2025-03-18 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-18 08:37:17] Production.INFO: count ==448  
[2025-03-18 08:37:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:37:05 - End Time 2025-03-18 08:37:05  
[2025-03-18 08:37:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706984', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706984', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706984', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:37:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706984', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:37:17] Production.INFO: ProcessCDR(1,14706984,1,1,2)  
[2025-03-18 08:37:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706984,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:37:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706984,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:37:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706984,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706984,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706984', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:37:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706984', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:37:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:37:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:37:23] Production.INFO: ==10498== Releasing lock...  
[2025-03-18 08:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:37:23] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 08:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:38:05
    [end_date_ymd] => 2025-03-18 08:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:38:05' and `end` < '2025-03-18 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-18 08:38:18] Production.INFO: count ==453  
[2025-03-18 08:38:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:38:05 - End Time 2025-03-18 08:38:05  
[2025-03-18 08:38:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706989', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706989', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706989', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706989', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:38:18] Production.INFO: ProcessCDR(1,14706989,1,1,2)  
[2025-03-18 08:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706989,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706989,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706989,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706989,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706989', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706989', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:38:21] Production.INFO: ==10570== Releasing lock...  
[2025-03-18 08:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:38:21] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 08:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:39:05
    [end_date_ymd] => 2025-03-18 08:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:39:05' and `end` < '2025-03-18 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-18 08:39:17] Production.INFO: count ==454  
[2025-03-18 08:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:39:05 - End Time 2025-03-18 08:39:05  
[2025-03-18 08:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706994', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706994', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706994', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706994', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:39:18] Production.INFO: ProcessCDR(1,14706994,1,1,2)  
[2025-03-18 08:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706994,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706994,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706994,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706994,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706994', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706994', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:39:21] Production.INFO: ==10640== Releasing lock...  
[2025-03-18 08:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:39:21] Production.INFO: 31.75 MB  #Memory Used#   
[2025-03-18 08:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:40:06
    [end_date_ymd] => 2025-03-18 08:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:40:06' and `end` < '2025-03-18 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-18 08:40:18] Production.INFO: count ==473  
[2025-03-18 08:40:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:40:06 - End Time 2025-03-18 08:40:06  
[2025-03-18 08:40:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14706999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706999', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14706999', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:40:18] Production.INFO: ProcessCDR(1,14706999,1,1,2)  
[2025-03-18 08:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14706999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14706999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14706999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14706999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14706999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:40:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:40:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:40:23] Production.INFO: ==10718== Releasing lock...  
[2025-03-18 08:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:40:23] Production.INFO: 32.25 MB  #Memory Used#   
[2025-03-18 08:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:41:05
    [end_date_ymd] => 2025-03-18 08:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:41:05' and `end` < '2025-03-18 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-18 08:41:18] Production.INFO: count ==523  
[2025-03-18 08:41:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:41:05 - End Time 2025-03-18 08:41:05  
[2025-03-18 08:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707005', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707005', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707005', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707005', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:41:18] Production.INFO: ProcessCDR(1,14707005,1,1,2)  
[2025-03-18 08:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:41:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707005,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:41:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:41:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707005,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:41:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707005', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:41:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707005', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:41:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:41:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:41:23] Production.INFO: ==10794== Releasing lock...  
[2025-03-18 08:41:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:41:23] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 08:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:42:05
    [end_date_ymd] => 2025-03-18 08:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:42:05' and `end` < '2025-03-18 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-18 08:42:17] Production.INFO: count ==539  
[2025-03-18 08:42:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:42:05 - End Time 2025-03-18 08:42:05  
[2025-03-18 08:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707010', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707010', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707010', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707010', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:42:18] Production.INFO: ProcessCDR(1,14707010,1,1,2)  
[2025-03-18 08:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:42:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707010,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:42:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707010,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707010', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:42:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707010', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:42:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:42:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:42:23] Production.INFO: ==10867== Releasing lock...  
[2025-03-18 08:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:42:23] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 08:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:43:05
    [end_date_ymd] => 2025-03-18 08:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:43:05' and `end` < '2025-03-18 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-18 08:43:17] Production.INFO: count ==548  
[2025-03-18 08:43:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:43:05 - End Time 2025-03-18 08:43:05  
[2025-03-18 08:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707015', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707015', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707015', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707015', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:43:18] Production.INFO: ProcessCDR(1,14707015,1,1,2)  
[2025-03-18 08:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:43:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707015,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:43:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:43:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707015,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707015', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707015', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:43:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:43:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:43:23] Production.INFO: ==10945== Releasing lock...  
[2025-03-18 08:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:43:23] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 08:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:44:05
    [end_date_ymd] => 2025-03-18 08:44:05
    [RateCDR] => 1
)
  
[2025-03-18 08:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:44:05' and `end` < '2025-03-18 08:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:44:17] Production.INFO: count ==560  
[2025-03-18 08:44:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:44:05 - End Time 2025-03-18 08:44:05  
[2025-03-18 08:44:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707020', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707020', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707020', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:44:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707020', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:44:17] Production.INFO: ProcessCDR(1,14707020,1,1,2)  
[2025-03-18 08:44:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:44:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:44:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:44:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707020', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707020', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:44:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:44:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:44:22] Production.INFO: ==11018== Releasing lock...  
[2025-03-18 08:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:44:22] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 08:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:45:05
    [end_date_ymd] => 2025-03-18 08:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:45:05' and `end` < '2025-03-18 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-18 08:45:17] Production.INFO: count ==561  
[2025-03-18 08:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:45:05 - End Time 2025-03-18 08:45:05  
[2025-03-18 08:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707025', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707025', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707025', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707025', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:45:18] Production.INFO: ProcessCDR(1,14707025,1,1,2)  
[2025-03-18 08:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:45:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:45:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:45:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707025', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707025', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:45:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:45:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:45:22] Production.INFO: ==11135== Releasing lock...  
[2025-03-18 08:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:45:22] Production.INFO: 33 MB  #Memory Used#   
[2025-03-18 08:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:46:05
    [end_date_ymd] => 2025-03-18 08:46:05
    [RateCDR] => 1
)
  
[2025-03-18 08:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:46:05' and `end` < '2025-03-18 08:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:46:17] Production.INFO: count ==571  
[2025-03-18 08:46:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:46:05 - End Time 2025-03-18 08:46:05  
[2025-03-18 08:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707030', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707030', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707030', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707030', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:46:17] Production.INFO: ProcessCDR(1,14707030,1,1,2)  
[2025-03-18 08:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707030,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:46:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707030,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:46:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707030,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:46:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707030,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:46:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707030', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707030', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:46:21] Production.INFO: ==11211== Releasing lock...  
[2025-03-18 08:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:46:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 08:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:47:06
    [end_date_ymd] => 2025-03-18 08:47:06
    [RateCDR] => 1
)
  
[2025-03-18 08: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-18 05:47:06' and `end` < '2025-03-18 08: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-18 08:47:18] Production.INFO: count ==571  
[2025-03-18 08:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:47:06 - End Time 2025-03-18 08:47:06  
[2025-03-18 08:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707035', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707035', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707035', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707035', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:47:18] Production.INFO: ProcessCDR(1,14707035,1,1,2)  
[2025-03-18 08:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707035,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707035,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707035,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707035,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707035', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707035', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:47:21] Production.INFO: ==11284== Releasing lock...  
[2025-03-18 08:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:47:21] Production.INFO: 32.5 MB  #Memory Used#   
[2025-03-18 08:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:48:05
    [end_date_ymd] => 2025-03-18 08:48:05
    [RateCDR] => 1
)
  
[2025-03-18 08: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-18 05:48:05' and `end` < '2025-03-18 08: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-18 08:48:17] Production.INFO: count ==572  
[2025-03-18 08:48:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:48:05 - End Time 2025-03-18 08:48:05  
[2025-03-18 08:48:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707040', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707040', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707040', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:48:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707040', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:48:17] Production.INFO: ProcessCDR(1,14707040,1,1,2)  
[2025-03-18 08:48:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707040,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:48:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707040,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:48:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707040,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707040,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707040', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707040', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:48:21] Production.INFO: ==11355== Releasing lock...  
[2025-03-18 08:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:48:21] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 08:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:49:06
    [end_date_ymd] => 2025-03-18 08:49:06
    [RateCDR] => 1
)
  
[2025-03-18 08:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:49:06' and `end` < '2025-03-18 08:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:49:18] Production.INFO: count ==577  
[2025-03-18 08:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:49:06 - End Time 2025-03-18 08:49:06  
[2025-03-18 08:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707045', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707045', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707045', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707045', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:49:18] Production.INFO: ProcessCDR(1,14707045,1,1,2)  
[2025-03-18 08:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707045,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:49:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707045,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:49:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707045,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:49:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707045,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707045', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707045', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:49:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:49:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:49:22] Production.INFO: ==11426== Releasing lock...  
[2025-03-18 08:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:49:22] Production.INFO: 33.25 MB  #Memory Used#   
[2025-03-18 08:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:50:06
    [end_date_ymd] => 2025-03-18 08:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:50:06' and `end` < '2025-03-18 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-18 08:50:18] Production.INFO: count ==592  
[2025-03-18 08:50:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:50:06 - End Time 2025-03-18 08:50:06  
[2025-03-18 08:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707050', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707050', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707050', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707050', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:50:18] Production.INFO: ProcessCDR(1,14707050,1,1,2)  
[2025-03-18 08:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707050', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707050', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:50:22] Production.INFO: ==11500== Releasing lock...  
[2025-03-18 08:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:50:22] Production.INFO: 32.75 MB  #Memory Used#   
[2025-03-18 08:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:51:05
    [end_date_ymd] => 2025-03-18 08:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:51:05' and `end` < '2025-03-18 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-18 08:51:17] Production.INFO: count ==621  
[2025-03-18 08:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:51:05 - End Time 2025-03-18 08:51:05  
[2025-03-18 08:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707056', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707056', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707056', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707056', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:51:18] Production.INFO: ProcessCDR(1,14707056,1,1,2)  
[2025-03-18 08:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707056,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707056,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707056', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707056', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:51:21] Production.INFO: ==11588== Releasing lock...  
[2025-03-18 08:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:51:21] Production.INFO: 33.5 MB  #Memory Used#   
[2025-03-18 08:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:52:05
    [end_date_ymd] => 2025-03-18 08:52:05
    [RateCDR] => 1
)
  
[2025-03-18 08:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:52:05' and `end` < '2025-03-18 08:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:52:18] Production.INFO: count ==631  
[2025-03-18 08:52:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:52:05 - End Time 2025-03-18 08:52:05  
[2025-03-18 08:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707061', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707061', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707061', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707061', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:52:18] Production.INFO: ProcessCDR(1,14707061,1,1,2)  
[2025-03-18 08:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:52:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707061,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:52:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:52:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707061,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707061', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707061', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:52:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:52:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:52:24] Production.INFO: ==11659== Releasing lock...  
[2025-03-18 08:52:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:52:24] Production.INFO: 33 MB  #Memory Used#   
[2025-03-18 08:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:53:06
    [end_date_ymd] => 2025-03-18 08:53:06
    [RateCDR] => 1
)
  
[2025-03-18 08:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 05:53:06' and `end` < '2025-03-18 08:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:53:18] Production.INFO: count ==633  
[2025-03-18 08:53:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:53:06 - End Time 2025-03-18 08:53:06  
[2025-03-18 08:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707066', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707066', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707066', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707066', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:53:18] Production.INFO: ProcessCDR(1,14707066,1,1,2)  
[2025-03-18 08:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:53:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707066,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:53:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:53:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707066,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707066', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707066', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:53:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:53:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:53:23] Production.INFO: ==11732== Releasing lock...  
[2025-03-18 08:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:53:23] Production.INFO: 33.75 MB  #Memory Used#   
[2025-03-18 08:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:54:05
    [end_date_ymd] => 2025-03-18 08:54:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:54:05' and `end` < '2025-03-18 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-18 08:54:18] Production.INFO: count ==646  
[2025-03-18 08:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:54:05 - End Time 2025-03-18 08:54:05  
[2025-03-18 08:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707071', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707071', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707071', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707071', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:54:18] Production.INFO: ProcessCDR(1,14707071,1,1,2)  
[2025-03-18 08:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707071', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707071', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:54:21] Production.INFO: ==11809== Releasing lock...  
[2025-03-18 08:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:54:21] Production.INFO: 33.75 MB  #Memory Used#   
[2025-03-18 08:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:55:05
    [end_date_ymd] => 2025-03-18 08:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:55:05' and `end` < '2025-03-18 08:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 08:55:17] Production.INFO: count ==660  
[2025-03-18 08:55:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:55:05 - End Time 2025-03-18 08:55:05  
[2025-03-18 08:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707076', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707076', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707076', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707076', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:55:18] Production.INFO: ProcessCDR(1,14707076,1,1,2)  
[2025-03-18 08:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:55:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:55:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707076', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:55:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707076', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:55:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:55:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:55:23] Production.INFO: ==11891== Releasing lock...  
[2025-03-18 08:55:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:55:23] Production.INFO: 33 MB  #Memory Used#   
[2025-03-18 08:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:56:06
    [end_date_ymd] => 2025-03-18 08:56:06
    [RateCDR] => 1
)
  
[2025-03-18 08: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-18 05:56:06' and `end` < '2025-03-18 08: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-18 08:56:18] Production.INFO: count ==666  
[2025-03-18 08:56:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:56:06 - End Time 2025-03-18 08:56:06  
[2025-03-18 08:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707081', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707081', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707081', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707081', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:56:18] Production.INFO: ProcessCDR(1,14707081,1,1,2)  
[2025-03-18 08:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707081,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707081,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707081,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:56:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707081,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707081', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707081', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:56:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:56:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:56:22] Production.INFO: ==11967== Releasing lock...  
[2025-03-18 08:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:56:22] Production.INFO: 33.75 MB  #Memory Used#   
[2025-03-18 08:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:57:05
    [end_date_ymd] => 2025-03-18 08:57:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:57:05' and `end` < '2025-03-18 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-18 08:57:17] Production.INFO: count ==685  
[2025-03-18 08:57:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:57:05 - End Time 2025-03-18 08:57:05  
[2025-03-18 08:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707086', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707086', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707086', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707086', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:57:18] Production.INFO: ProcessCDR(1,14707086,1,1,2)  
[2025-03-18 08:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707086,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:57:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707086,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:57:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707086,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:57:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707086,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707086', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707086', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:57:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:57:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:57:23] Production.INFO: ==12046== Releasing lock...  
[2025-03-18 08:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:57:23] Production.INFO: 33.5 MB  #Memory Used#   
[2025-03-18 08:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:58:05
    [end_date_ymd] => 2025-03-18 08:58:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:58:05' and `end` < '2025-03-18 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-18 08:58:18] Production.INFO: count ==695  
[2025-03-18 08:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 05:58:05 - End Time 2025-03-18 08:58:05  
[2025-03-18 08:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707091', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707091', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707091', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707091', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:58:18] Production.INFO: ProcessCDR(1,14707091,1,1,2)  
[2025-03-18 08:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707091,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707091,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707091,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707091,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707091', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707091', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:58:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:58:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:58:23] Production.INFO: ==12125== Releasing lock...  
[2025-03-18 08:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:58:23] Production.INFO: 33.5 MB  #Memory Used#   
[2025-03-18 08:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 05:59:05
    [end_date_ymd] => 2025-03-18 08:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 05:59:05' and `end` < '2025-03-18 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-18 08:59:17] Production.INFO: count ==697  
[2025-03-18 08:59:17] Production.ERROR: pbx CDR StartTime 2025-03-18 05:59:05 - End Time 2025-03-18 08:59:05  
[2025-03-18 08:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 08:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707096', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707096', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707096', 'tblTempVendorCDR_20' ) start  
[2025-03-18 08:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707096', 'tblTempVendorCDR_20' ) end  
[2025-03-18 08:59:17] Production.INFO: ProcessCDR(1,14707096,1,1,2)  
[2025-03-18 08:59:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707096,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:59:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707096,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 08:59:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707096,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:59:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707096,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 08:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707096', 'tblTempUsageDetail_20' ) start  
[2025-03-18 08:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707096', 'tblTempUsageDetail_20' ) end  
[2025-03-18 08:59:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 08:59:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 08:59:22] Production.INFO: ==12203== Releasing lock...  
[2025-03-18 08:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 08:59:22] Production.INFO: 34.25 MB  #Memory Used#   
[2025-03-18 09:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:00:06
    [end_date_ymd] => 2025-03-18 09:00:06
    [RateCDR] => 1
)
  
[2025-03-18 09:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:00:06' and `end` < '2025-03-18 09:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:00:18] Production.INFO: count ==712  
[2025-03-18 09:00:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:00:06 - End Time 2025-03-18 09:00:06  
[2025-03-18 09:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707102', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707102', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707102', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707102', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:00:19] Production.INFO: ProcessCDR(1,14707102,1,1,2)  
[2025-03-18 09:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707102,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707102,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707102', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707102', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:00:23] Production.INFO: ==12285== Releasing lock...  
[2025-03-18 09:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:00:23] Production.INFO: 33.5 MB  #Memory Used#   
[2025-03-18 09:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:01:05
    [end_date_ymd] => 2025-03-18 09:01:05
    [RateCDR] => 1
)
  
[2025-03-18 09:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:01:05' and `end` < '2025-03-18 09:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:01:18] Production.INFO: count ==760  
[2025-03-18 09:01:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:01:05 - End Time 2025-03-18 09:01:05  
[2025-03-18 09:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707107', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707107', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707107', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707107', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:01:18] Production.INFO: ProcessCDR(1,14707107,1,1,2)  
[2025-03-18 09:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:01:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707107,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:01:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:01:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707107,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707107', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707107', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:01:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:01:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:01:23] Production.INFO: ==12423== Releasing lock...  
[2025-03-18 09:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:01:23] Production.INFO: 34 MB  #Memory Used#   
[2025-03-18 09:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:02:06
    [end_date_ymd] => 2025-03-18 09:02:06
    [RateCDR] => 1
)
  
[2025-03-18 09:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:02:06' and `end` < '2025-03-18 09:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:02:18] Production.INFO: count ==778  
[2025-03-18 09:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:02:06 - End Time 2025-03-18 09:02:06  
[2025-03-18 09:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707112', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707112', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707112', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707112', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:02:18] Production.INFO: ProcessCDR(1,14707112,1,1,2)  
[2025-03-18 09:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707112,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707112,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707112,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:02:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707112,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707112', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707112', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:02:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:02:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:02:24] Production.INFO: ==12503== Releasing lock...  
[2025-03-18 09:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:02:24] Production.INFO: 34 MB  #Memory Used#   
[2025-03-18 09:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:03:05
    [end_date_ymd] => 2025-03-18 09:03:05
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:03:05' and `end` < '2025-03-18 09: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-18 09:03:17] Production.INFO: count ==804  
[2025-03-18 09:03:17] Production.ERROR: pbx CDR StartTime 2025-03-18 06:03:05 - End Time 2025-03-18 09:03:05  
[2025-03-18 09:03:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707117', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707117', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707117', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:03:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707117', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:03:17] Production.INFO: ProcessCDR(1,14707117,1,1,2)  
[2025-03-18 09:03:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:03:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707117,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:03:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:03:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707117,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707117', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707117', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:03:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:03:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:03:23] Production.INFO: ==12581== Releasing lock...  
[2025-03-18 09:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:03:23] Production.INFO: 33.75 MB  #Memory Used#   
[2025-03-18 09:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:04:05
    [end_date_ymd] => 2025-03-18 09:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:04:05' and `end` < '2025-03-18 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-18 09:04:17] Production.INFO: count ==824  
[2025-03-18 09:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:04:05 - End Time 2025-03-18 09:04:05  
[2025-03-18 09:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707122', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707122', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707122', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707122', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:04:18] Production.INFO: ProcessCDR(1,14707122,1,1,2)  
[2025-03-18 09:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707122,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:04:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707122,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:04:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707122,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:04:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707122,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:04:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707122', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:04:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707122', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:04:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:04:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:04:23] Production.INFO: ==12663== Releasing lock...  
[2025-03-18 09:04:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:04:23] Production.INFO: 34 MB  #Memory Used#   
[2025-03-18 09:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:05:05
    [end_date_ymd] => 2025-03-18 09:05:05
    [RateCDR] => 1
)
  
[2025-03-18 09:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:05:05' and `end` < '2025-03-18 09:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:05:17] Production.INFO: count ==853  
[2025-03-18 09:05:17] Production.ERROR: pbx CDR StartTime 2025-03-18 06:05:05 - End Time 2025-03-18 09:05:05  
[2025-03-18 09:05:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707127', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707127', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707127', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:05:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707127', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:05:17] Production.INFO: ProcessCDR(1,14707127,1,1,2)  
[2025-03-18 09:05:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707127,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:05:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707127,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:05:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707127,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707127,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707127', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707127', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:05:22] Production.INFO: ==12744== Releasing lock...  
[2025-03-18 09:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:05:22] Production.INFO: 34.5 MB  #Memory Used#   
[2025-03-18 09:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:06:05
    [end_date_ymd] => 2025-03-18 09:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:06:05' and `end` < '2025-03-18 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-18 09:06:17] Production.INFO: count ==877  
[2025-03-18 09:06:17] Production.ERROR: pbx CDR StartTime 2025-03-18 06:06:05 - End Time 2025-03-18 09:06:05  
[2025-03-18 09:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707132', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707132', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707132', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707132', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:06:17] Production.INFO: ProcessCDR(1,14707132,1,1,2)  
[2025-03-18 09:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:06:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:06:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:06:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:06:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707132', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:06:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707132', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:06:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:06:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:06:23] Production.INFO: ==12821== Releasing lock...  
[2025-03-18 09:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:06:23] Production.INFO: 34.75 MB  #Memory Used#   
[2025-03-18 09:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:07:06
    [end_date_ymd] => 2025-03-18 09:07:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:07:06' and `end` < '2025-03-18 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-18 09:07:18] Production.INFO: count ==893  
[2025-03-18 09:07:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:07:06 - End Time 2025-03-18 09:07:06  
[2025-03-18 09:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707137', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707137', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707137', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707137', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:07:19] Production.INFO: ProcessCDR(1,14707137,1,1,2)  
[2025-03-18 09:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707137,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:07:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707137,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:07:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707137,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707137,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707137', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707137', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:07:24] Production.INFO: ==12898== Releasing lock...  
[2025-03-18 09:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:07:24] Production.INFO: 34.75 MB  #Memory Used#   
[2025-03-18 09:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:08:05
    [end_date_ymd] => 2025-03-18 09:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:08:05' and `end` < '2025-03-18 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-18 09:08:17] Production.INFO: count ==909  
[2025-03-18 09:08:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:08:05 - End Time 2025-03-18 09:08:05  
[2025-03-18 09:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707142', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707142', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707142', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707142', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:08:18] Production.INFO: ProcessCDR(1,14707142,1,1,2)  
[2025-03-18 09:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:08:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:08:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:08:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:08:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707142', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:08:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707142', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:08:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:08:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:08:23] Production.INFO: ==12978== Releasing lock...  
[2025-03-18 09:08:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:08:23] Production.INFO: 35 MB  #Memory Used#   
[2025-03-18 09:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:09:05
    [end_date_ymd] => 2025-03-18 09:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:09:05' and `end` < '2025-03-18 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-18 09:09:17] Production.INFO: count ==931  
[2025-03-18 09:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:09:05 - End Time 2025-03-18 09:09:05  
[2025-03-18 09:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707147', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707147', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707147', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707147', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:09:18] Production.INFO: ProcessCDR(1,14707147,1,1,2)  
[2025-03-18 09:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707147,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:09:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707147,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:09:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707147,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:09:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707147,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707147', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:09:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707147', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:09:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:09:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:09:23] Production.INFO: ==13054== Releasing lock...  
[2025-03-18 09:09:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:09:23] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 09:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:10:06
    [end_date_ymd] => 2025-03-18 09:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:10:06' and `end` < '2025-03-18 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-18 09:10:18] Production.INFO: count ==949  
[2025-03-18 09:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:10:06 - End Time 2025-03-18 09:10:06  
[2025-03-18 09:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707153', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707153', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707153', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707153', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:10:18] Production.INFO: ProcessCDR(1,14707153,1,1,2)  
[2025-03-18 09:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:10:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707153,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:10:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:10:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707153,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:10:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707153', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:10:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707153', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:10:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:10:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:10:24] Production.INFO: ==13134== Releasing lock...  
[2025-03-18 09:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:10:24] Production.INFO: 35.25 MB  #Memory Used#   
[2025-03-18 09:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:11:05
    [end_date_ymd] => 2025-03-18 09:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:11:05' and `end` < '2025-03-18 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-18 09:11:17] Production.INFO: count ==1056  
[2025-03-18 09:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:11:05 - End Time 2025-03-18 09:11:05  
[2025-03-18 09:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707158', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707158', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707158', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707158', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:11:18] Production.INFO: ProcessCDR(1,14707158,1,1,2)  
[2025-03-18 09:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707158,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:11:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707158,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:11:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707158', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707158', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:11:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:11:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:11:22] Production.INFO: ==13216== Releasing lock...  
[2025-03-18 09:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:11:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 09:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:12:06
    [end_date_ymd] => 2025-03-18 09:12:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:12:06' and `end` < '2025-03-18 09: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-18 09:12:18] Production.INFO: count ==1067  
[2025-03-18 09:12:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:12:06 - End Time 2025-03-18 09:12:06  
[2025-03-18 09:12:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707163', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707163', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707163', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707163', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:12:19] Production.INFO: ProcessCDR(1,14707163,1,1,2)  
[2025-03-18 09:12:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:12:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707163,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:12:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:12:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707163,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707163', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707163', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:12:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:12:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:12:24] Production.INFO: ==13290== Releasing lock...  
[2025-03-18 09:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:12:24] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 09:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:13:05
    [end_date_ymd] => 2025-03-18 09:13:05
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:13:05' and `end` < '2025-03-18 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-18 09:13:17] Production.INFO: count ==1078  
[2025-03-18 09:13:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:13:05 - End Time 2025-03-18 09:13:05  
[2025-03-18 09:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707168', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707168', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707168', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707168', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:13:18] Production.INFO: ProcessCDR(1,14707168,1,1,2)  
[2025-03-18 09:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:13:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707168,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:13:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:13:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707168,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707168', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:13:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707168', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:13:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:13:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:13:23] Production.INFO: ==13374== Releasing lock...  
[2025-03-18 09:13:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:13:23] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 09:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:14:06
    [end_date_ymd] => 2025-03-18 09:14:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:14:06' and `end` < '2025-03-18 09: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-18 09:14:18] Production.INFO: count ==1087  
[2025-03-18 09:14:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:14:06 - End Time 2025-03-18 09:14:06  
[2025-03-18 09:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707173', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707173', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707173', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707173', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:14:18] Production.INFO: ProcessCDR(1,14707173,1,1,2)  
[2025-03-18 09:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:14:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:14:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:14:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:14:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707173', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:14:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707173', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:14:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:14:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:14:24] Production.INFO: ==13455== Releasing lock...  
[2025-03-18 09:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:14:24] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 09:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:15:05
    [end_date_ymd] => 2025-03-18 09:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:15:05' and `end` < '2025-03-18 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-18 09:15:17] Production.INFO: count ==1094  
[2025-03-18 09:15:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:15:05 - End Time 2025-03-18 09:15:05  
[2025-03-18 09:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707178', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707178', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707178', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707178', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:15:18] Production.INFO: ProcessCDR(1,14707178,1,1,2)  
[2025-03-18 09:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707178', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707178', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:15:21] Production.INFO: ==13532== Releasing lock...  
[2025-03-18 09:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:15:21] Production.INFO: 36.25 MB  #Memory Used#   
[2025-03-18 09:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:16:06
    [end_date_ymd] => 2025-03-18 09:16:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:16:06' and `end` < '2025-03-18 09: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-18 09:16:18] Production.INFO: count ==1104  
[2025-03-18 09:16:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:16:06 - End Time 2025-03-18 09:16:06  
[2025-03-18 09:16:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707183', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707183', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707183', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707183', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:16:19] Production.INFO: ProcessCDR(1,14707183,1,1,2)  
[2025-03-18 09:16:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:16:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:16:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:16:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:16:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707183', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:16:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707183', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:16:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:16:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:16:24] Production.INFO: ==13655== Releasing lock...  
[2025-03-18 09:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:16:24] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 09:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:17:05
    [end_date_ymd] => 2025-03-18 09:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:17:05' and `end` < '2025-03-18 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-18 09:17:17] Production.INFO: count ==1121  
[2025-03-18 09:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:17:05 - End Time 2025-03-18 09:17:05  
[2025-03-18 09:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707188', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707188', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707188', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707188', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:17:18] Production.INFO: ProcessCDR(1,14707188,1,1,2)  
[2025-03-18 09:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707188,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:17:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707188,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:17:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707188,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:17:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707188,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:17:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707188', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:17:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707188', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:17:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:17:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:17:24] Production.INFO: ==13738== Releasing lock...  
[2025-03-18 09:17:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:17:24] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 09:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:18:06
    [end_date_ymd] => 2025-03-18 09:18:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:18:06' and `end` < '2025-03-18 09: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-18 09:18:18] Production.INFO: count ==1125  
[2025-03-18 09:18:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:18:06 - End Time 2025-03-18 09:18:06  
[2025-03-18 09:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707193', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707193', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707193', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707193', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:18:19] Production.INFO: ProcessCDR(1,14707193,1,1,2)  
[2025-03-18 09:18:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:18:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:18:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:18:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:18:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707193', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:18:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707193', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:18:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:18:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:18:24] Production.INFO: ==13832== Releasing lock...  
[2025-03-18 09:18:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:18:24] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 09:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:19:05
    [end_date_ymd] => 2025-03-18 09:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:19:05' and `end` < '2025-03-18 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-18 09:19:18] Production.INFO: count ==1157  
[2025-03-18 09:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:19:05 - End Time 2025-03-18 09:19:05  
[2025-03-18 09:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707198', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707198', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707198', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707198', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:19:18] Production.INFO: ProcessCDR(1,14707198,1,1,2)  
[2025-03-18 09:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707198,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:19:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707198,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:19:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707198,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:19:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707198,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707198', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707198', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:19:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:19:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:19:24] Production.INFO: ==13906== Releasing lock...  
[2025-03-18 09:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:19:24] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 09:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:20:07
    [end_date_ymd] => 2025-03-18 09:20:07
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:20:07' and `end` < '2025-03-18 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-18 09:20:19] Production.INFO: count ==1185  
[2025-03-18 09:20:20] Production.ERROR: pbx CDR StartTime 2025-03-18 06:20:07 - End Time 2025-03-18 09:20:07  
[2025-03-18 09:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707204', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707204', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707204', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707204', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:20:20] Production.INFO: ProcessCDR(1,14707204,1,1,2)  
[2025-03-18 09:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:20:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707204,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:20:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707204,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707204', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707204', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:20:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:20:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:20:26] Production.INFO: ==13986== Releasing lock...  
[2025-03-18 09:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:20:26] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 09:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:21:05
    [end_date_ymd] => 2025-03-18 09:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:21:05' and `end` < '2025-03-18 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-18 09:21:17] Production.INFO: count ==1278  
[2025-03-18 09:21:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:21:05 - End Time 2025-03-18 09:21:05  
[2025-03-18 09:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707209', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707209', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707209', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707209', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:21:18] Production.INFO: ProcessCDR(1,14707209,1,1,2)  
[2025-03-18 09:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:21:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707209,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:21:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:21:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707209,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707209', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707209', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:21:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:21:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:21:24] Production.INFO: ==14073== Releasing lock...  
[2025-03-18 09:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:21:24] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 09:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:22:05
    [end_date_ymd] => 2025-03-18 09:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:22:05' and `end` < '2025-03-18 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-18 09:22:18] Production.INFO: count ==1300  
[2025-03-18 09:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:22:05 - End Time 2025-03-18 09:22:05  
[2025-03-18 09:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707214', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707214', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707214', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707214', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:22:19] Production.INFO: ProcessCDR(1,14707214,1,1,2)  
[2025-03-18 09:22:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707214,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:22:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707214,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707214', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707214', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:22:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:22:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:22:24] Production.INFO: ==14158== Releasing lock...  
[2025-03-18 09:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:22:24] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 09:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:23:05
    [end_date_ymd] => 2025-03-18 09:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:23:05' and `end` < '2025-03-18 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-18 09:23:18] Production.INFO: count ==1333  
[2025-03-18 09:23:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:23:05 - End Time 2025-03-18 09:23:05  
[2025-03-18 09:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707219', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707219', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707219', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707219', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:23:18] Production.INFO: ProcessCDR(1,14707219,1,1,2)  
[2025-03-18 09:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:23:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707219,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:23:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:23:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707219,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:23:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707219', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:23:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707219', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:23:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:23:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:23:24] Production.INFO: ==14239== Releasing lock...  
[2025-03-18 09:23:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:23:24] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 09:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:24:06
    [end_date_ymd] => 2025-03-18 09:24:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:24:06' and `end` < '2025-03-18 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-18 09:24:19] Production.INFO: count ==1373  
[2025-03-18 09:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 06:24:06 - End Time 2025-03-18 09:24:06  
[2025-03-18 09:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707224', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707224', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707224', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707224', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:24:20] Production.INFO: ProcessCDR(1,14707224,1,1,2)  
[2025-03-18 09:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707224,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:24:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707224,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:24:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707224,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:24:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707224,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:24:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707224', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:24:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707224', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:24:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:24:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:24:23] Production.INFO: ==14320== Releasing lock...  
[2025-03-18 09:24:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:24:23] Production.INFO: 38.25 MB  #Memory Used#   
[2025-03-18 09:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:25:05
    [end_date_ymd] => 2025-03-18 09:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:25:05' and `end` < '2025-03-18 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-18 09:25:18] Production.INFO: count ==1382  
[2025-03-18 09:25:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:25:05 - End Time 2025-03-18 09:25:05  
[2025-03-18 09:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707229', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707229', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707229', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707229', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:25:18] Production.INFO: ProcessCDR(1,14707229,1,1,2)  
[2025-03-18 09:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:25:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:25:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:25:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:25:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707229', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:25:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707229', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:25:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:25:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:25:24] Production.INFO: ==14395== Releasing lock...  
[2025-03-18 09:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:25:24] Production.INFO: 38.25 MB  #Memory Used#   
[2025-03-18 09:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:26:06
    [end_date_ymd] => 2025-03-18 09:26:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:26:06' and `end` < '2025-03-18 09: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-18 09:26:18] Production.INFO: count ==1384  
[2025-03-18 09:26:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:26:06 - End Time 2025-03-18 09:26:06  
[2025-03-18 09:26:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707234', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707234', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707234', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707234', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:26:19] Production.INFO: ProcessCDR(1,14707234,1,1,2)  
[2025-03-18 09:26:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707234,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:26:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707234,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:26:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707234,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:26:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707234,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707234', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707234', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:26:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:26:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:26:24] Production.INFO: ==14474== Releasing lock...  
[2025-03-18 09:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:26:24] Production.INFO: 38.5 MB  #Memory Used#   
[2025-03-18 09:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:27:05
    [end_date_ymd] => 2025-03-18 09:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:27:05' and `end` < '2025-03-18 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-18 09:27:17] Production.INFO: count ==1408  
[2025-03-18 09:27:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:27:05 - End Time 2025-03-18 09:27:05  
[2025-03-18 09:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707239', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707239', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707239', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707239', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:27:18] Production.INFO: ProcessCDR(1,14707239,1,1,2)  
[2025-03-18 09:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707239,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:27:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707239,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:27:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707239,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:27:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707239,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:27:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707239', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:27:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707239', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:27:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:27:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:27:23] Production.INFO: ==14554== Releasing lock...  
[2025-03-18 09:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:27:23] Production.INFO: 38.75 MB  #Memory Used#   
[2025-03-18 09:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:28:06
    [end_date_ymd] => 2025-03-18 09:28:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:28:06' and `end` < '2025-03-18 09: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-18 09:28:18] Production.INFO: count ==1417  
[2025-03-18 09:28:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:28:06 - End Time 2025-03-18 09:28:06  
[2025-03-18 09:28:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707244', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707244', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707244', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707244', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:28:19] Production.INFO: ProcessCDR(1,14707244,1,1,2)  
[2025-03-18 09:28:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707244,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:28:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707244,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:28:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707244,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:28:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707244,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707244', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707244', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:28:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:28:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:28:24] Production.INFO: ==14630== Releasing lock...  
[2025-03-18 09:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:28:24] Production.INFO: 39 MB  #Memory Used#   
[2025-03-18 09:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:29:05
    [end_date_ymd] => 2025-03-18 09:29:05
    [RateCDR] => 1
)
  
[2025-03-18 09:29:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:29:05' and `end` < '2025-03-18 09:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:29:17] Production.INFO: count ==1418  
[2025-03-18 09:29:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:29:05 - End Time 2025-03-18 09:29:05  
[2025-03-18 09:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707249', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707249', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707249', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707249', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:29:18] Production.INFO: ProcessCDR(1,14707249,1,1,2)  
[2025-03-18 09:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707249,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:29:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707249,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:29:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707249,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:29:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707249,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707249', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707249', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:29:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:29:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:29:23] Production.INFO: ==14706== Releasing lock...  
[2025-03-18 09:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:29:23] Production.INFO: 39 MB  #Memory Used#   
[2025-03-18 09:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:30:06
    [end_date_ymd] => 2025-03-18 09:30:06
    [RateCDR] => 1
)
  
[2025-03-18 09:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:30:06' and `end` < '2025-03-18 09:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:30:18] Production.INFO: count ==1435  
[2025-03-18 09:30:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:30:06 - End Time 2025-03-18 09:30:06  
[2025-03-18 09:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707254', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707254', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707254', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707254', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:30:19] Production.INFO: ProcessCDR(1,14707254,1,1,2)  
[2025-03-18 09:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:30:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:30:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:30:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707254', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707254', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:30:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:30:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:30:24] Production.INFO: ==14789== Releasing lock...  
[2025-03-18 09:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:30:24] Production.INFO: 38.75 MB  #Memory Used#   
[2025-03-18 09:31:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:31:04
    [end_date_ymd] => 2025-03-18 09:31:04
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:31:04' and `end` < '2025-03-18 09: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-18 09:31:17] Production.INFO: count ==1525  
[2025-03-18 09:31:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:31:04 - End Time 2025-03-18 09:31:04  
[2025-03-18 09:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707260', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707260', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707260', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707260', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:31:18] Production.INFO: ProcessCDR(1,14707260,1,1,2)  
[2025-03-18 09:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:31:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707260,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:31:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:31:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707260,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:31:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707260', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:31:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707260', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:31:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:31:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:31:23] Production.INFO: ==14870== Releasing lock...  
[2025-03-18 09:31:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:31:23] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 09:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:32:06
    [end_date_ymd] => 2025-03-18 09:32:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:32:06' and `end` < '2025-03-18 09: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-18 09:32:18] Production.INFO: count ==1549  
[2025-03-18 09:32:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:32:06 - End Time 2025-03-18 09:32:06  
[2025-03-18 09:32:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707265', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707265', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707265', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707265', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:32:19] Production.INFO: ProcessCDR(1,14707265,1,1,2)  
[2025-03-18 09:32:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:32:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707265,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:32:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:32:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707265,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707265', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707265', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:32:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:32:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:32:24] Production.INFO: ==14980== Releasing lock...  
[2025-03-18 09:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:32:24] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 09:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:33:05
    [end_date_ymd] => 2025-03-18 09:33:05
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:33:05' and `end` < '2025-03-18 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-18 09:33:18] Production.INFO: count ==1569  
[2025-03-18 09:33:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:33:05 - End Time 2025-03-18 09:33:05  
[2025-03-18 09:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707270', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707270', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707270', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707270', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:33:18] Production.INFO: ProcessCDR(1,14707270,1,1,2)  
[2025-03-18 09:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:33:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707270,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:33:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:33:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707270,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:33:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707270', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:33:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707270', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:33:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:33:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:33:23] Production.INFO: ==15055== Releasing lock...  
[2025-03-18 09:33:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:33:23] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 09:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:34:06
    [end_date_ymd] => 2025-03-18 09:34:06
    [RateCDR] => 1
)
  
[2025-03-18 09:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:34:06' and `end` < '2025-03-18 09:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:34:18] Production.INFO: count ==1578  
[2025-03-18 09:34:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:34:06 - End Time 2025-03-18 09:34:06  
[2025-03-18 09:34:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707275', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707275', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707275', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707275', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:34:19] Production.INFO: ProcessCDR(1,14707275,1,1,2)  
[2025-03-18 09:34:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:34:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:34:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:34:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707275', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707275', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:34:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:34:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:34:24] Production.INFO: ==15132== Releasing lock...  
[2025-03-18 09:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:34:24] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 09:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:35:05
    [end_date_ymd] => 2025-03-18 09:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:35:05' and `end` < '2025-03-18 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-18 09:35:18] Production.INFO: count ==1582  
[2025-03-18 09:35:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:35:05 - End Time 2025-03-18 09:35:05  
[2025-03-18 09:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707280', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707280', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707280', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707280', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:35:19] Production.INFO: ProcessCDR(1,14707280,1,1,2)  
[2025-03-18 09:35:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:35:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:35:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:35:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:35:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707280', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:35:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707280', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:35:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:35:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:35:24] Production.INFO: ==15203== Releasing lock...  
[2025-03-18 09:35:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:35:24] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 09:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:36:05
    [end_date_ymd] => 2025-03-18 09:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:36:05' and `end` < '2025-03-18 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-18 09:36:18] Production.INFO: count ==1585  
[2025-03-18 09:36:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:36:05 - End Time 2025-03-18 09:36:05  
[2025-03-18 09:36:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707285', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707285', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707285', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707285', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:36:19] Production.INFO: ProcessCDR(1,14707285,1,1,2)  
[2025-03-18 09:36:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707285,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:36:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707285,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:36:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707285,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:36:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707285,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:36:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707285', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:36:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707285', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:36:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:36:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:36:24] Production.INFO: ==15282== Releasing lock...  
[2025-03-18 09:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:36:24] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 09:37:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:37:04
    [end_date_ymd] => 2025-03-18 09:37:04
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:37:04' and `end` < '2025-03-18 09: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-18 09:37:17] Production.INFO: count ==1601  
[2025-03-18 09:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:37:04 - End Time 2025-03-18 09:37:04  
[2025-03-18 09:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707290', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707290', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707290', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707290', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:37:18] Production.INFO: ProcessCDR(1,14707290,1,1,2)  
[2025-03-18 09:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707290,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:37:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707290,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:37:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707290,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707290,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707290', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:37:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707290', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:37:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:37:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:37:23] Production.INFO: ==15353== Releasing lock...  
[2025-03-18 09:37:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:37:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 09:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:38:05
    [end_date_ymd] => 2025-03-18 09:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:38:05' and `end` < '2025-03-18 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-18 09:38:18] Production.INFO: count ==1650  
[2025-03-18 09:38:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:38:05 - End Time 2025-03-18 09:38:05  
[2025-03-18 09:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707295', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707295', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707295', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707295', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:38:19] Production.INFO: ProcessCDR(1,14707295,1,1,2)  
[2025-03-18 09:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707295,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:38:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707295,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:38:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707295,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:38:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707295,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707295', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707295', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:38:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:38:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:38:24] Production.INFO: ==15424== Releasing lock...  
[2025-03-18 09:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:38:24] Production.INFO: 40.5 MB  #Memory Used#   
[2025-03-18 09:39:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:39:04
    [end_date_ymd] => 2025-03-18 09:39:04
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:39:04' and `end` < '2025-03-18 09: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-18 09:39:17] Production.INFO: count ==1691  
[2025-03-18 09:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:39:04 - End Time 2025-03-18 09:39:04  
[2025-03-18 09:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707300', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707300', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707300', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707300', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:39:18] Production.INFO: ProcessCDR(1,14707300,1,1,2)  
[2025-03-18 09:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707300,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:39:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707300,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:39:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707300,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707300,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707300', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707300', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:39:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:39:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:39:23] Production.INFO: ==15497== Releasing lock...  
[2025-03-18 09:39:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:39:23] Production.INFO: 40.75 MB  #Memory Used#   
[2025-03-18 09:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:40:05
    [end_date_ymd] => 2025-03-18 09:40:05
    [RateCDR] => 1
)
  
[2025-03-18 09:40:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:40:05' and `end` < '2025-03-18 09:40:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:40:18] Production.INFO: count ==1711  
[2025-03-18 09:40:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:40:05 - End Time 2025-03-18 09:40:05  
[2025-03-18 09:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707306', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707306', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707306', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707306', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:40:19] Production.INFO: ProcessCDR(1,14707306,1,1,2)  
[2025-03-18 09:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707306,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:40:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707306,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707306', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707306', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:40:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:40:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:40:24] Production.INFO: ==15572== Releasing lock...  
[2025-03-18 09:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:40:24] Production.INFO: 41 MB  #Memory Used#   
[2025-03-18 09:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:41:05
    [end_date_ymd] => 2025-03-18 09:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:41:05' and `end` < '2025-03-18 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-18 09:41:18] Production.INFO: count ==1835  
[2025-03-18 09:41:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:41:05 - End Time 2025-03-18 09:41:05  
[2025-03-18 09:41:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707311', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707311', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707311', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707311', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:41:19] Production.INFO: ProcessCDR(1,14707311,1,1,2)  
[2025-03-18 09:41:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:41:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707311,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:41:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:41:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707311,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707311', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707311', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:41:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:41:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:41:24] Production.INFO: ==15662== Releasing lock...  
[2025-03-18 09:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:41:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 09:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:42:05
    [end_date_ymd] => 2025-03-18 09:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:42:05' and `end` < '2025-03-18 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-18 09:42:18] Production.INFO: count ==1849  
[2025-03-18 09:42:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:42:05 - End Time 2025-03-18 09:42:05  
[2025-03-18 09:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707316', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707316', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707316', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707316', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:42:18] Production.INFO: ProcessCDR(1,14707316,1,1,2)  
[2025-03-18 09:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707316,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:42:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707316,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:42:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707316,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:42:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707316,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:42:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707316', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:42:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707316', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:42:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:42:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:42:24] Production.INFO: ==15733== Releasing lock...  
[2025-03-18 09:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:42:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 09:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:43:06
    [end_date_ymd] => 2025-03-18 09:43:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:43:06' and `end` < '2025-03-18 09: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-18 09:43:18] Production.INFO: count ==1895  
[2025-03-18 09:43:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:43:06 - End Time 2025-03-18 09:43:06  
[2025-03-18 09:43:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707321', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707321', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707321', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707321', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:43:19] Production.INFO: ProcessCDR(1,14707321,1,1,2)  
[2025-03-18 09:43:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707321,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707321,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707321,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:43:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707321,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707321', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707321', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:43:25] Production.INFO: ==15807== Releasing lock...  
[2025-03-18 09:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:43:25] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 09:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:44:05
    [end_date_ymd] => 2025-03-18 09:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:44:05' and `end` < '2025-03-18 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-18 09:44:17] Production.INFO: count ==1898  
[2025-03-18 09:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:44:05 - End Time 2025-03-18 09:44:05  
[2025-03-18 09:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707326', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707326', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707326', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707326', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:44:18] Production.INFO: ProcessCDR(1,14707326,1,1,2)  
[2025-03-18 09:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707326,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:44:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707326,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:44:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707326,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:44:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707326,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707326', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707326', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:44:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:44:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:44:23] Production.INFO: ==15879== Releasing lock...  
[2025-03-18 09:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:44:23] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 09:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:45:05
    [end_date_ymd] => 2025-03-18 09:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:45:05' and `end` < '2025-03-18 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-18 09:45:18] Production.INFO: count ==1906  
[2025-03-18 09:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:45:05 - End Time 2025-03-18 09:45:05  
[2025-03-18 09:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707331', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707331', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707331', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707331', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:45:19] Production.INFO: ProcessCDR(1,14707331,1,1,2)  
[2025-03-18 09:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707331,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:45:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707331,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:45:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707331,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:45:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707331,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707331', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707331', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:45:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:45:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:45:22] Production.INFO: ==15953== Releasing lock...  
[2025-03-18 09:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:45:22] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 09:46:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:46:04
    [end_date_ymd] => 2025-03-18 09:46:04
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:46:04' and `end` < '2025-03-18 09: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-18 09:46:17] Production.INFO: count ==1921  
[2025-03-18 09:46:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:46:04 - End Time 2025-03-18 09:46:04  
[2025-03-18 09:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707336', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707336', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707336', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707336', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:46:18] Production.INFO: ProcessCDR(1,14707336,1,1,2)  
[2025-03-18 09:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707336,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:46:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707336,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:46:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707336,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:46:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707336,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:46:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707336', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:46:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707336', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:46:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:46:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:46:23] Production.INFO: ==16024== Releasing lock...  
[2025-03-18 09:46:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:46:23] Production.INFO: 43 MB  #Memory Used#   
[2025-03-18 09:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:47:06
    [end_date_ymd] => 2025-03-18 09:47:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:47:06' and `end` < '2025-03-18 09: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-18 09:47:19] Production.INFO: count ==1930  
[2025-03-18 09:47:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:47:06 - End Time 2025-03-18 09:47:06  
[2025-03-18 09:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707341', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707341', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707341', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707341', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:47:19] Production.INFO: ProcessCDR(1,14707341,1,1,2)  
[2025-03-18 09:47:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707341,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:47:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707341,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:47:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707341,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:47:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707341,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707341', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707341', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:47:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:47:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:47:25] Production.INFO: ==16136== Releasing lock...  
[2025-03-18 09:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:47:25] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 09:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:48:05
    [end_date_ymd] => 2025-03-18 09:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:48:05' and `end` < '2025-03-18 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-18 09:48:18] Production.INFO: count ==1952  
[2025-03-18 09:48:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:48:05 - End Time 2025-03-18 09:48:05  
[2025-03-18 09:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707346', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707346', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707346', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707346', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:48:19] Production.INFO: ProcessCDR(1,14707346,1,1,2)  
[2025-03-18 09:48:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707346,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:48:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707346,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:48:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707346,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:48:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707346,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707346', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707346', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:48:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:48:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:48:24] Production.INFO: ==16206== Releasing lock...  
[2025-03-18 09:48:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:48:24] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 09:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:49:06
    [end_date_ymd] => 2025-03-18 09:49:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:49:06' and `end` < '2025-03-18 09: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-18 09:49:18] Production.INFO: count ==1976  
[2025-03-18 09:49:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:49:06 - End Time 2025-03-18 09:49:06  
[2025-03-18 09:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707351', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707351', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:49:19] Production.INFO: ProcessCDR(1,14707351,1,1,2)  
[2025-03-18 09:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:49:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:49:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:49:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:49:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:49:25] Production.INFO: ==16280== Releasing lock...  
[2025-03-18 09:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:49:25] Production.INFO: 43 MB  #Memory Used#   
[2025-03-18 09:50:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:50:05
    [end_date_ymd] => 2025-03-18 09:50:05
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:50:05' and `end` < '2025-03-18 09: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-18 09:50:18] Production.INFO: count ==1995  
[2025-03-18 09:50:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:50:05 - End Time 2025-03-18 09:50:05  
[2025-03-18 09:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707357', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707357', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707357', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707357', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:50:19] Production.INFO: ProcessCDR(1,14707357,1,1,2)  
[2025-03-18 09:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:50:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707357,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:50:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:50:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707357,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707357', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707357', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:50:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:50:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:50:25] Production.INFO: ==16356== Releasing lock...  
[2025-03-18 09:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:50:25] Production.INFO: 43.25 MB  #Memory Used#   
[2025-03-18 09:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:51:05
    [end_date_ymd] => 2025-03-18 09:51:05
    [RateCDR] => 1
)
  
[2025-03-18 09:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:51:05' and `end` < '2025-03-18 09:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:51:18] Production.INFO: count ==2101  
[2025-03-18 09:51:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:51:05 - End Time 2025-03-18 09:51:05  
[2025-03-18 09:51:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707362', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707362', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707362', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707362', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:51:19] Production.INFO: ProcessCDR(1,14707362,1,1,2)  
[2025-03-18 09:51:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707362,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:51:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707362,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:51:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707362,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:51:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707362,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:51:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707362', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:51:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707362', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:51:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:51:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:51:24] Production.INFO: ==16431== Releasing lock...  
[2025-03-18 09:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:51:24] Production.INFO: 43.75 MB  #Memory Used#   
[2025-03-18 09:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:52:05
    [end_date_ymd] => 2025-03-18 09:52:05
    [RateCDR] => 1
)
  
[2025-03-18 09:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:52:05' and `end` < '2025-03-18 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-18 09:52:18] Production.INFO: count ==2122  
[2025-03-18 09:52:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:52:05 - End Time 2025-03-18 09:52:05  
[2025-03-18 09:52:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707367', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707367', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707367', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707367', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:52:19] Production.INFO: ProcessCDR(1,14707367,1,1,2)  
[2025-03-18 09:52:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707367,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707367,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707367,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:52:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707367,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:52:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707367', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707367', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:52:25] Production.INFO: ==16503== Releasing lock...  
[2025-03-18 09:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:52:25] Production.INFO: 44.25 MB  #Memory Used#   
[2025-03-18 09:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:53:05
    [end_date_ymd] => 2025-03-18 09:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:53:05' and `end` < '2025-03-18 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-18 09:53:18] Production.INFO: count ==2136  
[2025-03-18 09:53:18] Production.ERROR: pbx CDR StartTime 2025-03-18 06:53:05 - End Time 2025-03-18 09:53:05  
[2025-03-18 09:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707372', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707372', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707372', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707372', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:53:18] Production.INFO: ProcessCDR(1,14707372,1,1,2)  
[2025-03-18 09:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707372,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:53:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707372,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:53:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707372,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:53:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707372,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707372', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:53:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707372', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:53:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:53:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:53:24] Production.INFO: ==16576== Releasing lock...  
[2025-03-18 09:53:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:53:24] Production.INFO: 44 MB  #Memory Used#   
[2025-03-18 09:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:54:06
    [end_date_ymd] => 2025-03-18 09:54:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:54:06' and `end` < '2025-03-18 09: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-18 09:54:19] Production.INFO: count ==2146  
[2025-03-18 09:54:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:54:06 - End Time 2025-03-18 09:54:06  
[2025-03-18 09:54:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707377', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707377', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707377', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707377', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:54:19] Production.INFO: ProcessCDR(1,14707377,1,1,2)  
[2025-03-18 09:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707377,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:54:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707377,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:54:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707377,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:54:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707377,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707377', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:54:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707377', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:54:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:54:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:54:24] Production.INFO: ==16649== Releasing lock...  
[2025-03-18 09:54:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:54:24] Production.INFO: 44.25 MB  #Memory Used#   
[2025-03-18 09:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:55:06
    [end_date_ymd] => 2025-03-18 09:55:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:55:06' and `end` < '2025-03-18 09: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-18 09:55:18] Production.INFO: count ==2157  
[2025-03-18 09:55:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:55:06 - End Time 2025-03-18 09:55:06  
[2025-03-18 09:55:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707382', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707382', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707382', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707382', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:55:19] Production.INFO: ProcessCDR(1,14707382,1,1,2)  
[2025-03-18 09:55:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707382,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:55:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707382,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:55:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707382,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707382,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707382', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707382', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:55:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:55:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:55:25] Production.INFO: ==16723== Releasing lock...  
[2025-03-18 09:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:55:25] Production.INFO: 44.25 MB  #Memory Used#   
[2025-03-18 09:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:56:06
    [end_date_ymd] => 2025-03-18 09:56:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:56:06' and `end` < '2025-03-18 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-18 09:56:18] Production.INFO: count ==2181  
[2025-03-18 09:56:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:56:06 - End Time 2025-03-18 09:56:06  
[2025-03-18 09:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707387', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707387', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707387', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707387', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:56:19] Production.INFO: ProcessCDR(1,14707387,1,1,2)  
[2025-03-18 09:56:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707387,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707387,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707387,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:56:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707387,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707387', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707387', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:56:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:56:25] Production.INFO: ==16797== Releasing lock...  
[2025-03-18 09:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:56:25] Production.INFO: 44.5 MB  #Memory Used#   
[2025-03-18 09:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:57:05
    [end_date_ymd] => 2025-03-18 09:57:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 06:57:05' and `end` < '2025-03-18 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-18 09:57:18] Production.INFO: count ==2223  
[2025-03-18 09:57:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:57:05 - End Time 2025-03-18 09:57:05  
[2025-03-18 09:57:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707392', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707392', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707392', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707392', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:57:19] Production.INFO: ProcessCDR(1,14707392,1,1,2)  
[2025-03-18 09:57:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707392,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:57:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707392,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:57:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707392,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:57:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707392,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707392', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707392', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:57:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:57:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:57:24] Production.INFO: ==16870== Releasing lock...  
[2025-03-18 09:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:57:24] Production.INFO: 44.75 MB  #Memory Used#   
[2025-03-18 09:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:58:06
    [end_date_ymd] => 2025-03-18 09:58:06
    [RateCDR] => 1
)
  
[2025-03-18 09: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-18 06:58:06' and `end` < '2025-03-18 09: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-18 09:58:18] Production.INFO: count ==2241  
[2025-03-18 09:58:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:58:06 - End Time 2025-03-18 09:58:06  
[2025-03-18 09:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707397', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707397', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:58:19] Production.INFO: ProcessCDR(1,14707397,1,1,2)  
[2025-03-18 09:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:58:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:58:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:58:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:58:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:58:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:58:25] Production.INFO: ==16940== Releasing lock...  
[2025-03-18 09:58:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:58:25] Production.INFO: 45 MB  #Memory Used#   
[2025-03-18 09:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 06:59:05
    [end_date_ymd] => 2025-03-18 09:59:05
    [RateCDR] => 1
)
  
[2025-03-18 09:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 06:59:05' and `end` < '2025-03-18 09:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 09:59:18] Production.INFO: count ==2251  
[2025-03-18 09:59:19] Production.ERROR: pbx CDR StartTime 2025-03-18 06:59:05 - End Time 2025-03-18 09:59:05  
[2025-03-18 09:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 09:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707402', 'tblTempVendorCDR_20' ) start  
[2025-03-18 09:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707402', 'tblTempVendorCDR_20' ) end  
[2025-03-18 09:59:19] Production.INFO: ProcessCDR(1,14707402,1,1,2)  
[2025-03-18 09:59:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:59:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 09:59:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 09:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 09:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 09:59:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 09:59:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 09:59:24] Production.INFO: ==17016== Releasing lock...  
[2025-03-18 09:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 09:59:24] Production.INFO: 45.25 MB  #Memory Used#   
[2025-03-18 10:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:00:06
    [end_date_ymd] => 2025-03-18 10:00:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:00:06' and `end` < '2025-03-18 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-18 10:00:19] Production.INFO: count ==2267  
[2025-03-18 10:00:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:00:06 - End Time 2025-03-18 10:00:06  
[2025-03-18 10:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707408', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707408', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707408', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707408', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:00:20] Production.INFO: ProcessCDR(1,14707408,1,1,2)  
[2025-03-18 10:00:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:00:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707408,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:00:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:00:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707408,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707408', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707408', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:00:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:00:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:00:25] Production.INFO: ==17092== Releasing lock...  
[2025-03-18 10:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:00:25] Production.INFO: 45 MB  #Memory Used#   
[2025-03-18 10:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:01:05
    [end_date_ymd] => 2025-03-18 10:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:01:05' and `end` < '2025-03-18 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-18 10:01:18] Production.INFO: count ==2374  
[2025-03-18 10:01:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:01:05 - End Time 2025-03-18 10:01:05  
[2025-03-18 10:01:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707413', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707413', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707413', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707413', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:01:19] Production.INFO: ProcessCDR(1,14707413,1,1,2)  
[2025-03-18 10:01:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707413,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:01:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707413,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:01:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707413,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:01:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707413,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707413', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707413', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:01:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:01:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:01:25] Production.INFO: ==17183== Releasing lock...  
[2025-03-18 10:01:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:01:25] Production.INFO: 46 MB  #Memory Used#   
[2025-03-18 10:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:02:05
    [end_date_ymd] => 2025-03-18 10:02:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:02:05' and `end` < '2025-03-18 10: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-18 10:02:18] Production.INFO: count ==2388  
[2025-03-18 10:02:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:02:05 - End Time 2025-03-18 10:02:05  
[2025-03-18 10:02:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707418', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707418', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707418', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:02:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707418', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:02:19] Production.INFO: ProcessCDR(1,14707418,1,1,2)  
[2025-03-18 10:02:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707418,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:02:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707418,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:02:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707418,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:02:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707418,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:02:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707418', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:02:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707418', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:02:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:02:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:02:24] Production.INFO: ==17256== Releasing lock...  
[2025-03-18 10:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:02:24] Production.INFO: 46 MB  #Memory Used#   
[2025-03-18 10:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:03:05
    [end_date_ymd] => 2025-03-18 10:03:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:03:05' and `end` < '2025-03-18 10: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-18 10:03:18] Production.INFO: count ==2410  
[2025-03-18 10:03:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:03:05 - End Time 2025-03-18 10:03:05  
[2025-03-18 10:03:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707423', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707423', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707423', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707423', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:03:19] Production.INFO: ProcessCDR(1,14707423,1,1,2)  
[2025-03-18 10:03:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707423,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:03:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707423,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:03:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707423,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:03:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707423,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:03:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707423', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:03:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707423', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:03:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:03:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:03:25] Production.INFO: ==17367== Releasing lock...  
[2025-03-18 10:03:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:03:25] Production.INFO: 46.25 MB  #Memory Used#   
[2025-03-18 10:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:04:06
    [end_date_ymd] => 2025-03-18 10:04:06
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:04:06' and `end` < '2025-03-18 10: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-18 10:04:19] Production.INFO: count ==2445  
[2025-03-18 10:04:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:04:06 - End Time 2025-03-18 10:04:06  
[2025-03-18 10:04:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707428', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707428', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707428', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707428', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:04:20] Production.INFO: ProcessCDR(1,14707428,1,1,2)  
[2025-03-18 10:04:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707428,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:04:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707428,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:04:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707428,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:04:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707428,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707428', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:04:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707428', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:04:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:04:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:04:25] Production.INFO: ==17439== Releasing lock...  
[2025-03-18 10:04:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:04:25] Production.INFO: 46.5 MB  #Memory Used#   
[2025-03-18 10:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:05:05
    [end_date_ymd] => 2025-03-18 10:05:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:05:05' and `end` < '2025-03-18 10: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-18 10:05:18] Production.INFO: count ==2464  
[2025-03-18 10:05:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:05:05 - End Time 2025-03-18 10:05:05  
[2025-03-18 10:05:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707433', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707433', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707433', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707433', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:05:19] Production.INFO: ProcessCDR(1,14707433,1,1,2)  
[2025-03-18 10:05:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707433,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707433,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707433,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:05:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707433,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707433', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707433', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:05:25] Production.INFO: ==17510== Releasing lock...  
[2025-03-18 10:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:05:25] Production.INFO: 46.5 MB  #Memory Used#   
[2025-03-18 10:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:06:06
    [end_date_ymd] => 2025-03-18 10:06:06
    [RateCDR] => 1
)
  
[2025-03-18 10:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:06:06' and `end` < '2025-03-18 10:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:06:19] Production.INFO: count ==2494  
[2025-03-18 10:06:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:06:06 - End Time 2025-03-18 10:06:06  
[2025-03-18 10:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707438', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707438', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707438', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707438', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:06:20] Production.INFO: ProcessCDR(1,14707438,1,1,2)  
[2025-03-18 10:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707438,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707438,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707438,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707438,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707438', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707438', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:06:26] Production.INFO: ==17585== Releasing lock...  
[2025-03-18 10:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:06:26] Production.INFO: 46.75 MB  #Memory Used#   
[2025-03-18 10:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:07:05
    [end_date_ymd] => 2025-03-18 10:07:05
    [RateCDR] => 1
)
  
[2025-03-18 10:07:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:07:05' and `end` < '2025-03-18 10:07:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:07:18] Production.INFO: count ==2530  
[2025-03-18 10:07:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:07:05 - End Time 2025-03-18 10:07:05  
[2025-03-18 10:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707443', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707443', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707443', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707443', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:07:19] Production.INFO: ProcessCDR(1,14707443,1,1,2)  
[2025-03-18 10:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707443,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707443,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707443,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707443,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707443', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707443', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:07:24] Production.INFO: ==17657== Releasing lock...  
[2025-03-18 10:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:07:24] Production.INFO: 47.25 MB  #Memory Used#   
[2025-03-18 10:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:08:05
    [end_date_ymd] => 2025-03-18 10:08:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:08:05' and `end` < '2025-03-18 10: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-18 10:08:18] Production.INFO: count ==2536  
[2025-03-18 10:08:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:08:05 - End Time 2025-03-18 10:08:05  
[2025-03-18 10:08:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707448', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707448', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707448', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707448', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:08:19] Production.INFO: ProcessCDR(1,14707448,1,1,2)  
[2025-03-18 10:08:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707448,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:08:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707448,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:08:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707448,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:08:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707448,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:08:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707448', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:08:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707448', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:08:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:08:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:08:25] Production.INFO: ==17731== Releasing lock...  
[2025-03-18 10:08:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:08:25] Production.INFO: 47 MB  #Memory Used#   
[2025-03-18 10:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:09:05
    [end_date_ymd] => 2025-03-18 10:09:05
    [RateCDR] => 1
)
  
[2025-03-18 10:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:09:05' and `end` < '2025-03-18 10:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:09:18] Production.INFO: count ==2559  
[2025-03-18 10:09:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:09:05 - End Time 2025-03-18 10:09:05  
[2025-03-18 10:09:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707453', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707453', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:09:19] Production.INFO: ProcessCDR(1,14707453,1,1,2)  
[2025-03-18 10:09:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:09:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:09:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:09:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:09:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:09:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:09:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:09:24] Production.INFO: ==17807== Releasing lock...  
[2025-03-18 10:09:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:09:24] Production.INFO: 47.25 MB  #Memory Used#   
[2025-03-18 10:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:10:06
    [end_date_ymd] => 2025-03-18 10:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:10:06' and `end` < '2025-03-18 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-18 10:10:19] Production.INFO: count ==2585  
[2025-03-18 10:10:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:10:06 - End Time 2025-03-18 10:10:06  
[2025-03-18 10:10:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707459', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707459', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707459', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707459', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:10:20] Production.INFO: ProcessCDR(1,14707459,1,1,2)  
[2025-03-18 10:10:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:10:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707459,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:10:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:10:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707459,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707459', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707459', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:10:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:10:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:10:25] Production.INFO: ==17883== Releasing lock...  
[2025-03-18 10:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:10:25] Production.INFO: 47.5 MB  #Memory Used#   
[2025-03-18 10:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:11:05
    [end_date_ymd] => 2025-03-18 10:11:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:11:05' and `end` < '2025-03-18 10: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-18 10:11:18] Production.INFO: count ==2674  
[2025-03-18 10:11:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:11:05 - End Time 2025-03-18 10:11:05  
[2025-03-18 10:11:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707464', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707464', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707464', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:11:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707464', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:11:19] Production.INFO: ProcessCDR(1,14707464,1,1,2)  
[2025-03-18 10:11:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:11:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707464,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:11:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:11:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707464,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707464', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707464', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:11:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:11:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:11:24] Production.INFO: ==17957== Releasing lock...  
[2025-03-18 10:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:11:24] Production.INFO: 48.25 MB  #Memory Used#   
[2025-03-18 10:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:12:06
    [end_date_ymd] => 2025-03-18 10:12:06
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:12:06' and `end` < '2025-03-18 10: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-18 10:12:18] Production.INFO: count ==2713  
[2025-03-18 10:12:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:12:06 - End Time 2025-03-18 10:12:06  
[2025-03-18 10:12:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707469', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707469', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707469', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707469', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:12:19] Production.INFO: ProcessCDR(1,14707469,1,1,2)  
[2025-03-18 10:12:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707469,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:12:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707469,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:12:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707469,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:12:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707469,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707469', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707469', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:12:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:12:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:12:25] Production.INFO: ==18031== Releasing lock...  
[2025-03-18 10:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:12:25] Production.INFO: 48.5 MB  #Memory Used#   
[2025-03-18 10:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:13:05
    [end_date_ymd] => 2025-03-18 10:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:13:05' and `end` < '2025-03-18 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-18 10:13:18] Production.INFO: count ==2708  
[2025-03-18 10:13:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:13:05 - End Time 2025-03-18 10:13:05  
[2025-03-18 10:13:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707474', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707474', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707474', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707474', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:13:19] Production.INFO: ProcessCDR(1,14707474,1,1,2)  
[2025-03-18 10:13:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707474,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:13:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707474,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:13:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707474,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707474,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707474', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707474', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:13:25] Production.INFO: ==18103== Releasing lock...  
[2025-03-18 10:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:13:25] Production.INFO: 48.5 MB  #Memory Used#   
[2025-03-18 10:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:14:05
    [end_date_ymd] => 2025-03-18 10:14:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:14:05' and `end` < '2025-03-18 10: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-18 10:14:19] Production.INFO: count ==2743  
[2025-03-18 10:14:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:14:05 - End Time 2025-03-18 10:14:05  
[2025-03-18 10:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707479', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707479', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707479', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707479', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:14:20] Production.INFO: ProcessCDR(1,14707479,1,1,2)  
[2025-03-18 10:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707479,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:14:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707479,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:14:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707479,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707479,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707479', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707479', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:14:25] Production.INFO: ==18173== Releasing lock...  
[2025-03-18 10:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:14:25] Production.INFO: 48.75 MB  #Memory Used#   
[2025-03-18 10:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:15:05
    [end_date_ymd] => 2025-03-18 10:15:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:15:05' and `end` < '2025-03-18 10: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-18 10:15:18] Production.INFO: count ==2824  
[2025-03-18 10:15:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:15:05 - End Time 2025-03-18 10:15:05  
[2025-03-18 10:15:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707484', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707484', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707484', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707484', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:15:19] Production.INFO: ProcessCDR(1,14707484,1,1,2)  
[2025-03-18 10:15:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707484,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:15:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707484,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:15:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707484,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:15:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707484,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:15:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707484', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:15:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707484', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:15:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:15:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:15:25] Production.INFO: ==18250== Releasing lock...  
[2025-03-18 10:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:15:25] Production.INFO: 49.25 MB  #Memory Used#   
[2025-03-18 10:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:16:05
    [end_date_ymd] => 2025-03-18 10:16:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:16:05' and `end` < '2025-03-18 10: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-18 10:16:18] Production.INFO: count ==2827  
[2025-03-18 10:16:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:16:05 - End Time 2025-03-18 10:16:05  
[2025-03-18 10:16:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707489', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707489', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707489', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707489', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:16:20] Production.INFO: ProcessCDR(1,14707489,1,1,2)  
[2025-03-18 10:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707489,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:16:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707489,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:16:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707489,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:16:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707489,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:16:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707489', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:16:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707489', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:16:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:16:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:16:23] Production.INFO: ==18321== Releasing lock...  
[2025-03-18 10:16:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:16:23] Production.INFO: 49 MB  #Memory Used#   
[2025-03-18 10:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:17:05
    [end_date_ymd] => 2025-03-18 10:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:17:05' and `end` < '2025-03-18 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-18 10:17:18] Production.INFO: count ==2850  
[2025-03-18 10:17:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:17:05 - End Time 2025-03-18 10:17:05  
[2025-03-18 10:17:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707494', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707494', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707494', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707494', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:17:19] Production.INFO: ProcessCDR(1,14707494,1,1,2)  
[2025-03-18 10:17:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707494,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:17:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707494,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:17:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707494,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:17:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707494,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:17:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707494', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707494', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:17:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:17:25] Production.INFO: ==18393== Releasing lock...  
[2025-03-18 10:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:17:25] Production.INFO: 49.25 MB  #Memory Used#   
[2025-03-18 10:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:18:06
    [end_date_ymd] => 2025-03-18 10:18:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:18:06' and `end` < '2025-03-18 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-18 10:18:18] Production.INFO: count ==2863  
[2025-03-18 10:18:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:18:06 - End Time 2025-03-18 10:18:06  
[2025-03-18 10:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707499', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707499', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707499', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707499', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:18:20] Production.INFO: ProcessCDR(1,14707499,1,1,2)  
[2025-03-18 10:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707499,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707499,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707499,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707499,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707499', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707499', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:18:26] Production.INFO: ==18503== Releasing lock...  
[2025-03-18 10:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:18:26] Production.INFO: 49.5 MB  #Memory Used#   
[2025-03-18 10:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:19:05
    [end_date_ymd] => 2025-03-18 10:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:19:05' and `end` < '2025-03-18 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-18 10:19:19] Production.INFO: count ==2866  
[2025-03-18 10:19:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:19:05 - End Time 2025-03-18 10:19:05  
[2025-03-18 10:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707504', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707504', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:19:20] Production.INFO: ProcessCDR(1,14707504,1,1,2)  
[2025-03-18 10:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:19:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:19:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:19:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:19:25] Production.INFO: ==18576== Releasing lock...  
[2025-03-18 10:19:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:19:25] Production.INFO: 49.5 MB  #Memory Used#   
[2025-03-18 10:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:20:06
    [end_date_ymd] => 2025-03-18 10:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:20:06' and `end` < '2025-03-18 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-18 10:20:19] Production.INFO: count ==2908  
[2025-03-18 10:20:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:20:06 - End Time 2025-03-18 10:20:06  
[2025-03-18 10:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707510', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707510', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707510', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707510', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:20:20] Production.INFO: ProcessCDR(1,14707510,1,1,2)  
[2025-03-18 10:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:20:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707510,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:20:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707510,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707510', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707510', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:20:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:20:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:20:26] Production.INFO: ==18655== Releasing lock...  
[2025-03-18 10:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:20:26] Production.INFO: 49.5 MB  #Memory Used#   
[2025-03-18 10:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:21:05
    [end_date_ymd] => 2025-03-18 10:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:21:05' and `end` < '2025-03-18 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-18 10:21:18] Production.INFO: count ==3048  
[2025-03-18 10:21:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:21:05 - End Time 2025-03-18 10:21:05  
[2025-03-18 10:21:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707515', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707515', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707515', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707515', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:21:19] Production.INFO: ProcessCDR(1,14707515,1,1,2)  
[2025-03-18 10:21:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:21:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707515,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:21:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:21:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707515,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707515', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707515', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:21:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:21:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:21:25] Production.INFO: ==18731== Releasing lock...  
[2025-03-18 10:21:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:21:25] Production.INFO: 51.75 MB  #Memory Used#   
[2025-03-18 10:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:22:05
    [end_date_ymd] => 2025-03-18 10:22:05
    [RateCDR] => 1
)
  
[2025-03-18 10:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:22:05' and `end` < '2025-03-18 10:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:22:18] Production.INFO: count ==3069  
[2025-03-18 10:22:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:22:05 - End Time 2025-03-18 10:22:05  
[2025-03-18 10:22:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707520', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707520', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707520', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707520', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:22:19] Production.INFO: ProcessCDR(1,14707520,1,1,2)  
[2025-03-18 10:22:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707520,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:22:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707520,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:22:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707520,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:22:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707520,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707520', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707520', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:22:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:22:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:22:24] Production.INFO: ==18808== Releasing lock...  
[2025-03-18 10:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:22:24] Production.INFO: 51 MB  #Memory Used#   
[2025-03-18 10:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:23:05
    [end_date_ymd] => 2025-03-18 10:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:23:05' and `end` < '2025-03-18 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-18 10:23:18] Production.INFO: count ==3107  
[2025-03-18 10:23:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:23:05 - End Time 2025-03-18 10:23:05  
[2025-03-18 10:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707525', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707525', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707525', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707525', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:23:20] Production.INFO: ProcessCDR(1,14707525,1,1,2)  
[2025-03-18 10:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707525,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:23:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707525,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:23:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707525,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707525,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707525', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707525', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:23:25] Production.INFO: ==18887== Releasing lock...  
[2025-03-18 10:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:23:25] Production.INFO: 51.75 MB  #Memory Used#   
[2025-03-18 10:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:24:05
    [end_date_ymd] => 2025-03-18 10:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:24:05' and `end` < '2025-03-18 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-18 10:24:18] Production.INFO: count ==3118  
[2025-03-18 10:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:24:05 - End Time 2025-03-18 10:24:05  
[2025-03-18 10:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707530', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707530', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707530', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707530', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:24:20] Production.INFO: ProcessCDR(1,14707530,1,1,2)  
[2025-03-18 10:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:24:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:24:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707530', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707530', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:24:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:24:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:24:25] Production.INFO: ==18959== Releasing lock...  
[2025-03-18 10:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:24:25] Production.INFO: 51.5 MB  #Memory Used#   
[2025-03-18 10:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:25:05
    [end_date_ymd] => 2025-03-18 10:25:05
    [RateCDR] => 1
)
  
[2025-03-18 10:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:25:05' and `end` < '2025-03-18 10:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:25:18] Production.INFO: count ==3134  
[2025-03-18 10:25:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:25:05 - End Time 2025-03-18 10:25:05  
[2025-03-18 10:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707535', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707535', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707535', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707535', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:25:20] Production.INFO: ProcessCDR(1,14707535,1,1,2)  
[2025-03-18 10:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707535,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707535,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707535,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707535,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707535', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707535', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:25:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:25:25] Production.INFO: ==19032== Releasing lock...  
[2025-03-18 10:25:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:25:25] Production.INFO: 51.5 MB  #Memory Used#   
[2025-03-18 10:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:26:05
    [end_date_ymd] => 2025-03-18 10:26:05
    [RateCDR] => 1
)
  
[2025-03-18 10:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:26:05' and `end` < '2025-03-18 10:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:26:18] Production.INFO: count ==3163  
[2025-03-18 10:26:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:26:05 - End Time 2025-03-18 10:26:05  
[2025-03-18 10:26:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707540', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707540', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707540', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707540', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:26:19] Production.INFO: ProcessCDR(1,14707540,1,1,2)  
[2025-03-18 10:26:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707540,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:26:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707540,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:26:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707540,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:26:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707540,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707540', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:26:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707540', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:26:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:26:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:26:25] Production.INFO: ==19111== Releasing lock...  
[2025-03-18 10:26:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:26:25] Production.INFO: 51.75 MB  #Memory Used#   
[2025-03-18 10:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:27:05
    [end_date_ymd] => 2025-03-18 10:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:27:05' and `end` < '2025-03-18 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-18 10:27:18] Production.INFO: count ==3211  
[2025-03-18 10:27:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:27:05 - End Time 2025-03-18 10:27:05  
[2025-03-18 10:27:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707545', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707545', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707545', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707545', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:27:19] Production.INFO: ProcessCDR(1,14707545,1,1,2)  
[2025-03-18 10:27:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707545,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:27:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707545,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:27:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707545,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:27:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707545,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707545', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707545', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:27:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:27:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:27:25] Production.INFO: ==19182== Releasing lock...  
[2025-03-18 10:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:27:25] Production.INFO: 52 MB  #Memory Used#   
[2025-03-18 10:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:28:05
    [end_date_ymd] => 2025-03-18 10:28:05
    [RateCDR] => 1
)
  
[2025-03-18 10:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:28:05' and `end` < '2025-03-18 10:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:28:18] Production.INFO: count ==3214  
[2025-03-18 10:28:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:28:05 - End Time 2025-03-18 10:28:05  
[2025-03-18 10:28:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707550', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707550', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:28:19] Production.INFO: ProcessCDR(1,14707550,1,1,2)  
[2025-03-18 10:28:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:28:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:28:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:28:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:28:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:28:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:28:24] Production.INFO: ==19254== Releasing lock...  
[2025-03-18 10:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:28:24] Production.INFO: 52.25 MB  #Memory Used#   
[2025-03-18 10:29:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:29:04
    [end_date_ymd] => 2025-03-18 10:29:04
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:29:04' and `end` < '2025-03-18 10: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-18 10:29:18] Production.INFO: count ==3243  
[2025-03-18 10:29:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:29:04 - End Time 2025-03-18 10:29:04  
[2025-03-18 10:29:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707555', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707555', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:29:19] Production.INFO: ProcessCDR(1,14707555,1,1,2)  
[2025-03-18 10:29:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:29:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:29:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:29:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:29:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:29:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:29:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:29:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:29:24] Production.INFO: ==19327== Releasing lock...  
[2025-03-18 10:29:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:29:24] Production.INFO: 53.5 MB  #Memory Used#   
[2025-03-18 10:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:30:05
    [end_date_ymd] => 2025-03-18 10:30:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:30:05' and `end` < '2025-03-18 10: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-18 10:30:18] Production.INFO: count ==3294  
[2025-03-18 10:30:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:30:05 - End Time 2025-03-18 10:30:05  
[2025-03-18 10:30:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707561', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707561', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707561', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707561', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:30:20] Production.INFO: ProcessCDR(1,14707561,1,1,2)  
[2025-03-18 10:30:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707561,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:30:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707561,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:30:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707561,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:30:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707561,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707561', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707561', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:30:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:30:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:30:25] Production.INFO: ==19402== Releasing lock...  
[2025-03-18 10:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:30:25] Production.INFO: 53.25 MB  #Memory Used#   
[2025-03-18 10:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:31:06
    [end_date_ymd] => 2025-03-18 10:31:06
    [RateCDR] => 1
)
  
[2025-03-18 10:31:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:31:06' and `end` < '2025-03-18 10:31:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:31:19] Production.INFO: count ==3415  
[2025-03-18 10:31:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:31:06 - End Time 2025-03-18 10:31:06  
[2025-03-18 10:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707566', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707566', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707566', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707566', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:31:20] Production.INFO: ProcessCDR(1,14707566,1,1,2)  
[2025-03-18 10:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707566,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:31:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707566,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707566', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707566', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:31:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:31:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:31:26] Production.INFO: ==19476== Releasing lock...  
[2025-03-18 10:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:31:26] Production.INFO: 54.25 MB  #Memory Used#   
[2025-03-18 10:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:32:05
    [end_date_ymd] => 2025-03-18 10:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:32:05' and `end` < '2025-03-18 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-18 10:32:19] Production.INFO: count ==3447  
[2025-03-18 10:32:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:32:05 - End Time 2025-03-18 10:32:05  
[2025-03-18 10:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707571', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707571', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707571', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707571', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:32:20] Production.INFO: ProcessCDR(1,14707571,1,1,2)  
[2025-03-18 10:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707571,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707571,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707571,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707571,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707571', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707571', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:32:26] Production.INFO: ==19548== Releasing lock...  
[2025-03-18 10:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:32:26] Production.INFO: 54.75 MB  #Memory Used#   
[2025-03-18 10:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:33:05
    [end_date_ymd] => 2025-03-18 10:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:33:05' and `end` < '2025-03-18 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-18 10:33:18] Production.INFO: count ==3469  
[2025-03-18 10:33:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:33:05 - End Time 2025-03-18 10:33:05  
[2025-03-18 10:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707576', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707576', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707576', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707576', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:33:20] Production.INFO: ProcessCDR(1,14707576,1,1,2)  
[2025-03-18 10:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707576,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:33:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707576,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707576', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707576', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:33:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:33:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:33:25] Production.INFO: ==19658== Releasing lock...  
[2025-03-18 10:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:33:25] Production.INFO: 54.5 MB  #Memory Used#   
[2025-03-18 10:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:34:05
    [end_date_ymd] => 2025-03-18 10:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:34:05' and `end` < '2025-03-18 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-18 10:34:18] Production.INFO: count ==3477  
[2025-03-18 10:34:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:34:05 - End Time 2025-03-18 10:34:05  
[2025-03-18 10:34:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707581', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707581', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707581', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707581', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:34:20] Production.INFO: ProcessCDR(1,14707581,1,1,2)  
[2025-03-18 10:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:34:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707581,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:34:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707581,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707581', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707581', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:34:25] Production.INFO: ==19730== Releasing lock...  
[2025-03-18 10:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:34:25] Production.INFO: 54.75 MB  #Memory Used#   
[2025-03-18 10:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:35:05
    [end_date_ymd] => 2025-03-18 10:35:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:35:05' and `end` < '2025-03-18 10: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-18 10:35:18] Production.INFO: count ==3479  
[2025-03-18 10:35:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:35:05 - End Time 2025-03-18 10:35:05  
[2025-03-18 10:35:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707586', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:35:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707586', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:35:19] Production.INFO: ProcessCDR(1,14707586,1,1,2)  
[2025-03-18 10:35:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:35:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:35:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:35:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:35:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:35:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:35:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:35:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:35:25] Production.INFO: ==19802== Releasing lock...  
[2025-03-18 10:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:35:25] Production.INFO: 55.25 MB  #Memory Used#   
[2025-03-18 10:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:36:05
    [end_date_ymd] => 2025-03-18 10:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:36:05' and `end` < '2025-03-18 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-18 10:36:18] Production.INFO: count ==3505  
[2025-03-18 10:36:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:36:05 - End Time 2025-03-18 10:36:05  
[2025-03-18 10:36:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707591', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707591', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:36:19] Production.INFO: ProcessCDR(1,14707591,1,1,2)  
[2025-03-18 10:36:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:36:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:36:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:36:25] Production.INFO: ==19877== Releasing lock...  
[2025-03-18 10:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:36:25] Production.INFO: 54.25 MB  #Memory Used#   
[2025-03-18 10:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:37:05
    [end_date_ymd] => 2025-03-18 10:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:37:05' and `end` < '2025-03-18 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-18 10:37:18] Production.INFO: count ==3531  
[2025-03-18 10:37:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:37:05 - End Time 2025-03-18 10:37:05  
[2025-03-18 10:37:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707596', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707596', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707596', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:37:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707596', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:37:19] Production.INFO: ProcessCDR(1,14707596,1,1,2)  
[2025-03-18 10:37:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707596,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:37:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707596,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:37:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707596,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:37:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707596,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707596', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707596', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:37:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:37:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:37:24] Production.INFO: ==19948== Releasing lock...  
[2025-03-18 10:37:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:37:24] Production.INFO: 54.5 MB  #Memory Used#   
[2025-03-18 10:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:38:05
    [end_date_ymd] => 2025-03-18 10:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:38:05' and `end` < '2025-03-18 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-18 10:38:19] Production.INFO: count ==3531  
[2025-03-18 10:38:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:38:05 - End Time 2025-03-18 10:38:05  
[2025-03-18 10:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707601', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707601', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:38:20] Production.INFO: ProcessCDR(1,14707601,1,1,2)  
[2025-03-18 10:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:38:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:38:25] Production.INFO: ==20023== Releasing lock...  
[2025-03-18 10:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:38:25] Production.INFO: 55 MB  #Memory Used#   
[2025-03-18 10:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:39:05
    [end_date_ymd] => 2025-03-18 10:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:39:05' and `end` < '2025-03-18 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-18 10:39:18] Production.INFO: count ==3557  
[2025-03-18 10:39:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:39:05 - End Time 2025-03-18 10:39:05  
[2025-03-18 10:39:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707606', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707606', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:39:20] Production.INFO: ProcessCDR(1,14707606,1,1,2)  
[2025-03-18 10:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:39:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:39:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:39:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:39:25] Production.INFO: ==20100== Releasing lock...  
[2025-03-18 10:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:39:25] Production.INFO: 55.5 MB  #Memory Used#   
[2025-03-18 10:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:40:06
    [end_date_ymd] => 2025-03-18 10:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:40:06' and `end` < '2025-03-18 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-18 10:40:19] Production.INFO: count ==3570  
[2025-03-18 10:40:21] Production.ERROR: pbx CDR StartTime 2025-03-18 07:40:06 - End Time 2025-03-18 10:40:06  
[2025-03-18 10:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707612', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707612', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707612', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707612', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:40:21] Production.INFO: ProcessCDR(1,14707612,1,1,2)  
[2025-03-18 10:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:40:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707612,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:40:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:40:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707612,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707612', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707612', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:40:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:40:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:40:25] Production.INFO: ==20175== Releasing lock...  
[2025-03-18 10:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:40:25] Production.INFO: 55 MB  #Memory Used#   
[2025-03-18 10:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:41:05
    [end_date_ymd] => 2025-03-18 10:41:05
    [RateCDR] => 1
)
  
[2025-03-18 10:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:41:05' and `end` < '2025-03-18 10:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:41:18] Production.INFO: count ==3669  
[2025-03-18 10:41:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:41:05 - End Time 2025-03-18 10:41:05  
[2025-03-18 10:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707617', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707617', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707617', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707617', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:41:20] Production.INFO: ProcessCDR(1,14707617,1,1,2)  
[2025-03-18 10:41:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707617,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707617,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707617,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707617,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707617', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707617', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:41:26] Production.INFO: ==20250== Releasing lock...  
[2025-03-18 10:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:41:26] Production.INFO: 56 MB  #Memory Used#   
[2025-03-18 10:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:42:06
    [end_date_ymd] => 2025-03-18 10:42:06
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:42:06' and `end` < '2025-03-18 10: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-18 10:42:19] Production.INFO: count ==3694  
[2025-03-18 10:42:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:42:06 - End Time 2025-03-18 10:42:06  
[2025-03-18 10:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707622', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707622', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707622', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707622', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:42:21] Production.INFO: ProcessCDR(1,14707622,1,1,2)  
[2025-03-18 10:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707622,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707622,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707622', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707622', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:42:26] Production.INFO: ==20322== Releasing lock...  
[2025-03-18 10:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:42:26] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 10:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:43:05
    [end_date_ymd] => 2025-03-18 10:43:05
    [RateCDR] => 1
)
  
[2025-03-18 10:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:43:05' and `end` < '2025-03-18 10:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:43:18] Production.INFO: count ==3696  
[2025-03-18 10:43:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:43:05 - End Time 2025-03-18 10:43:05  
[2025-03-18 10:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707627', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707627', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707627', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707627', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:43:20] Production.INFO: ProcessCDR(1,14707627,1,1,2)  
[2025-03-18 10:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707627,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707627,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707627', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707627', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:43:25] Production.INFO: ==20396== Releasing lock...  
[2025-03-18 10:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:43:25] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 10:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:44:05
    [end_date_ymd] => 2025-03-18 10:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:44:05' and `end` < '2025-03-18 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-18 10:44:18] Production.INFO: count ==3710  
[2025-03-18 10:44:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:44:05 - End Time 2025-03-18 10:44:05  
[2025-03-18 10:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707632', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707632', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707632', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707632', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:44:20] Production.INFO: ProcessCDR(1,14707632,1,1,2)  
[2025-03-18 10:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707632,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:44:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707632,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:44:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707632,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:44:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707632,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707632', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707632', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:44:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:44:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:44:25] Production.INFO: ==20468== Releasing lock...  
[2025-03-18 10:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:44:25] Production.INFO: 55.75 MB  #Memory Used#   
[2025-03-18 10:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:45:06
    [end_date_ymd] => 2025-03-18 10:45:06
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:45:06' and `end` < '2025-03-18 10: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-18 10:45:19] Production.INFO: count ==3722  
[2025-03-18 10:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 07:45:06 - End Time 2025-03-18 10:45:06  
[2025-03-18 10:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707637', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707637', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:45:21] Production.INFO: ProcessCDR(1,14707637,1,1,2)  
[2025-03-18 10:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:45:26] Production.INFO: ==20542== Releasing lock...  
[2025-03-18 10:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:45:26] Production.INFO: 55.75 MB  #Memory Used#   
[2025-03-18 10:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:46:05
    [end_date_ymd] => 2025-03-18 10:46:05
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:46:05' and `end` < '2025-03-18 10:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:46:19] Production.INFO: count ==3751  
[2025-03-18 10:46:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:46:05 - End Time 2025-03-18 10:46:05  
[2025-03-18 10:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707642', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707642', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707642', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707642', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:46:20] Production.INFO: ProcessCDR(1,14707642,1,1,2)  
[2025-03-18 10:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707642,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707642,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707642,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:46:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707642,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707642', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707642', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:46:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:46:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:46:25] Production.INFO: ==20616== Releasing lock...  
[2025-03-18 10:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:46:25] Production.INFO: 56 MB  #Memory Used#   
[2025-03-18 10:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:47:05
    [end_date_ymd] => 2025-03-18 10:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:47:05' and `end` < '2025-03-18 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-18 10:47:19] Production.INFO: count ==3773  
[2025-03-18 10:47:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:47:05 - End Time 2025-03-18 10:47:05  
[2025-03-18 10:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707647', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707647', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707647', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707647', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:47:20] Production.INFO: ProcessCDR(1,14707647,1,1,2)  
[2025-03-18 10:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707647,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707647,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707647,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:47:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707647,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707647', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707647', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:47:26] Production.INFO: ==20686== Releasing lock...  
[2025-03-18 10:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:47:26] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 10:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:48:05
    [end_date_ymd] => 2025-03-18 10:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:48:05' and `end` < '2025-03-18 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-18 10:48:18] Production.INFO: count ==3784  
[2025-03-18 10:48:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:48:05 - End Time 2025-03-18 10:48:05  
[2025-03-18 10:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707652', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707652', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:48:20] Production.INFO: ProcessCDR(1,14707652,1,1,2)  
[2025-03-18 10:48:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:48:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:48:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:48:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:48:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:48:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:48:25] Production.INFO: ==20760== Releasing lock...  
[2025-03-18 10:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:48:25] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 10:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:49:06
    [end_date_ymd] => 2025-03-18 10:49:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:49:06' and `end` < '2025-03-18 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-18 10:49:19] Production.INFO: count ==3788  
[2025-03-18 10:49:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:49:06 - End Time 2025-03-18 10:49:06  
[2025-03-18 10:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707657', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707657', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:49:21] Production.INFO: ProcessCDR(1,14707657,1,1,2)  
[2025-03-18 10:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:49:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:49:26] Production.INFO: ==20872== Releasing lock...  
[2025-03-18 10:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:49:26] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 10:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:50:06
    [end_date_ymd] => 2025-03-18 10:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:50:06' and `end` < '2025-03-18 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-18 10:50:19] Production.INFO: count ==3792  
[2025-03-18 10:50:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:50:06 - End Time 2025-03-18 10:50:06  
[2025-03-18 10:50:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707663', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707663', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707663', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707663', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:50:20] Production.INFO: ProcessCDR(1,14707663,1,1,2)  
[2025-03-18 10:50:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707663,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:50:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707663,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707663', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707663', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:50:26] Production.INFO: ==20947== Releasing lock...  
[2025-03-18 10:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:50:26] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 10:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:51:05
    [end_date_ymd] => 2025-03-18 10:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:51:05' and `end` < '2025-03-18 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-18 10:51:18] Production.INFO: count ==3883  
[2025-03-18 10:51:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:51:05 - End Time 2025-03-18 10:51:05  
[2025-03-18 10:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707668', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707668', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707668', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707668', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:51:20] Production.INFO: ProcessCDR(1,14707668,1,1,2)  
[2025-03-18 10:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707668,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707668,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707668,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707668,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707668', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707668', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:51:25] Production.INFO: ==21024== Releasing lock...  
[2025-03-18 10:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:51:25] Production.INFO: 57.25 MB  #Memory Used#   
[2025-03-18 10:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:52:05
    [end_date_ymd] => 2025-03-18 10:52:05
    [RateCDR] => 1
)
  
[2025-03-18 10:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:52:05' and `end` < '2025-03-18 10:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:52:18] Production.INFO: count ==3897  
[2025-03-18 10:52:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:52:05 - End Time 2025-03-18 10:52:05  
[2025-03-18 10:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707673', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707673', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707673', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707673', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:52:20] Production.INFO: ProcessCDR(1,14707673,1,1,2)  
[2025-03-18 10:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707673,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707673,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707673', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707673', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:52:25] Production.INFO: ==21096== Releasing lock...  
[2025-03-18 10:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:52:25] Production.INFO: 57 MB  #Memory Used#   
[2025-03-18 10:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:53:06
    [end_date_ymd] => 2025-03-18 10:53:06
    [RateCDR] => 1
)
  
[2025-03-18 10:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:53:06' and `end` < '2025-03-18 10:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:53:19] Production.INFO: count ==3917  
[2025-03-18 10:53:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:53:06 - End Time 2025-03-18 10:53:06  
[2025-03-18 10:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707678', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707678', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707678', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707678', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:53:21] Production.INFO: ProcessCDR(1,14707678,1,1,2)  
[2025-03-18 10:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707678,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707678,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707678', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707678', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:53:26] Production.INFO: ==21170== Releasing lock...  
[2025-03-18 10:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:53:26] Production.INFO: 57.5 MB  #Memory Used#   
[2025-03-18 10:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:54:05
    [end_date_ymd] => 2025-03-18 10:54:05
    [RateCDR] => 1
)
  
[2025-03-18 10:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:54:05' and `end` < '2025-03-18 10:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:54:18] Production.INFO: count ==3920  
[2025-03-18 10:54:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:54:05 - End Time 2025-03-18 10:54:05  
[2025-03-18 10:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707683', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707683', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:54:20] Production.INFO: ProcessCDR(1,14707683,1,1,2)  
[2025-03-18 10:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:54:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:54:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:54:25] Production.INFO: ==21241== Releasing lock...  
[2025-03-18 10:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:54:25] Production.INFO: 57.75 MB  #Memory Used#   
[2025-03-18 10:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:55:05
    [end_date_ymd] => 2025-03-18 10:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:55:05' and `end` < '2025-03-18 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-18 10:55:18] Production.INFO: count ==3934  
[2025-03-18 10:55:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:55:05 - End Time 2025-03-18 10:55:05  
[2025-03-18 10:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707688', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707688', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:55:20] Production.INFO: ProcessCDR(1,14707688,1,1,2)  
[2025-03-18 10:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:55:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:55:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:55:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:55:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:55:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:55:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:55:25] Production.INFO: ==21314== Releasing lock...  
[2025-03-18 10:55:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:55:25] Production.INFO: 57.5 MB  #Memory Used#   
[2025-03-18 10:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:56:05
    [end_date_ymd] => 2025-03-18 10:56:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:56:05' and `end` < '2025-03-18 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-18 10:56:18] Production.INFO: count ==3971  
[2025-03-18 10:56:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:56:05 - End Time 2025-03-18 10:56:05  
[2025-03-18 10:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707693', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707693', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707693', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707693', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:56:19] Production.INFO: ProcessCDR(1,14707693,1,1,2)  
[2025-03-18 10:56:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707693,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707693,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707693,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:56:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707693,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707693', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707693', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:56:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:56:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:56:24] Production.INFO: ==21387== Releasing lock...  
[2025-03-18 10:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:56:24] Production.INFO: 57.75 MB  #Memory Used#   
[2025-03-18 10:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:57:06
    [end_date_ymd] => 2025-03-18 10:57:06
    [RateCDR] => 1
)
  
[2025-03-18 10:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 07:57:06' and `end` < '2025-03-18 10:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 10:57:19] Production.INFO: count ==3994  
[2025-03-18 10:57:20] Production.ERROR: pbx CDR StartTime 2025-03-18 07:57:06 - End Time 2025-03-18 10:57:06  
[2025-03-18 10:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707698', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707698', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707698', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707698', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:57:20] Production.INFO: ProcessCDR(1,14707698,1,1,2)  
[2025-03-18 10:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707698,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707698,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707698,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:57:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707698,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707698', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707698', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:57:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:57:26] Production.INFO: ==21459== Releasing lock...  
[2025-03-18 10:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:57:26] Production.INFO: 58 MB  #Memory Used#   
[2025-03-18 10:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:58:06
    [end_date_ymd] => 2025-03-18 10:58:06
    [RateCDR] => 1
)
  
[2025-03-18 10: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-18 07:58:06' and `end` < '2025-03-18 10: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-18 10:58:19] Production.INFO: count ==4019  
[2025-03-18 10:58:21] Production.ERROR: pbx CDR StartTime 2025-03-18 07:58:06 - End Time 2025-03-18 10:58:06  
[2025-03-18 10:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707703', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707703', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:58:21] Production.INFO: ProcessCDR(1,14707703,1,1,2)  
[2025-03-18 10:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:58:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:58:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:58:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:58:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:58:26] Production.INFO: ==21535== Releasing lock...  
[2025-03-18 10:58:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:58:26] Production.INFO: 58 MB  #Memory Used#   
[2025-03-18 10:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 07:59:05
    [end_date_ymd] => 2025-03-18 10:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 07:59:05' and `end` < '2025-03-18 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-18 10:59:18] Production.INFO: count ==4051  
[2025-03-18 10:59:19] Production.ERROR: pbx CDR StartTime 2025-03-18 07:59:05 - End Time 2025-03-18 10:59:05  
[2025-03-18 10:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 10:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707708', 'tblTempVendorCDR_20' ) start  
[2025-03-18 10:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707708', 'tblTempVendorCDR_20' ) end  
[2025-03-18 10:59:19] Production.INFO: ProcessCDR(1,14707708,1,1,2)  
[2025-03-18 10:59:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:59:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 10:59:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 10:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 10:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 10:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 10:59:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 10:59:25] Production.INFO: ==21613== Releasing lock...  
[2025-03-18 10:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 10:59:25] Production.INFO: 58.25 MB  #Memory Used#   
[2025-03-18 11:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:00:07
    [end_date_ymd] => 2025-03-18 11:00:07
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:00:07' and `end` < '2025-03-18 11: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-18 11:00:23] Production.INFO: count ==4065  
[2025-03-18 11:00:25] Production.ERROR: pbx CDR StartTime 2025-03-18 08:00:07 - End Time 2025-03-18 11:00:07  
[2025-03-18 11:00:25] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:00:25] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707714', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:00:25] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707714', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:00:25] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707714', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:00:25] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707714', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:00:25] Production.INFO: ProcessCDR(1,14707714,1,1,2)  
[2025-03-18 11:00:25] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:00:28] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707714,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:00:28] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:00:30] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707714,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:00:30] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707714', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:00:31] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707714', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:00:31] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:00:31] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:00:31] Production.INFO: ==21687== Releasing lock...  
[2025-03-18 11:00:31] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:00:31] Production.INFO: 58.25 MB  #Memory Used#   
[2025-03-18 11:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:01:05
    [end_date_ymd] => 2025-03-18 11:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:01:05' and `end` < '2025-03-18 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-18 11:01:19] Production.INFO: count ==4190  
[2025-03-18 11:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:01:05 - End Time 2025-03-18 11:01:05  
[2025-03-18 11:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707719', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707719', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707719', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707719', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:01:21] Production.INFO: ProcessCDR(1,14707719,1,1,2)  
[2025-03-18 11:01:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707719,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:01:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707719,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:01:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707719,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:01:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707719,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707719', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707719', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:01:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:01:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:01:27] Production.INFO: ==21820== Releasing lock...  
[2025-03-18 11:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:01:27] Production.INFO: 59.25 MB  #Memory Used#   
[2025-03-18 11:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:02:06
    [end_date_ymd] => 2025-03-18 11:02:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:02:06' and `end` < '2025-03-18 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-18 11:02:20] Production.INFO: count ==4220  
[2025-03-18 11:02:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:02:06 - End Time 2025-03-18 11:02:06  
[2025-03-18 11:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707724', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707724', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707724', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707724', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:02:22] Production.INFO: ProcessCDR(1,14707724,1,1,2)  
[2025-03-18 11:02:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707724,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707724,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707724,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:02:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707724,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:02:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707724', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:02:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707724', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:02:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:02:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:02:28] Production.INFO: ==21931== Releasing lock...  
[2025-03-18 11:02:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:02:28] Production.INFO: 59.5 MB  #Memory Used#   
[2025-03-18 11:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:03:05
    [end_date_ymd] => 2025-03-18 11:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:03:05' and `end` < '2025-03-18 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-18 11:03:19] Production.INFO: count ==4232  
[2025-03-18 11:03:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:03:05 - End Time 2025-03-18 11:03:05  
[2025-03-18 11:03:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707729', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707729', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707729', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707729', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:03:21] Production.INFO: ProcessCDR(1,14707729,1,1,2)  
[2025-03-18 11:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707729,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:03:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707729,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:03:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707729,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:03:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707729,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707729', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707729', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:03:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:03:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:03:27] Production.INFO: ==22003== Releasing lock...  
[2025-03-18 11:03:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:03:27] Production.INFO: 59.75 MB  #Memory Used#   
[2025-03-18 11:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:04:06
    [end_date_ymd] => 2025-03-18 11:04:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:04:06' and `end` < '2025-03-18 11: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-18 11:04:19] Production.INFO: count ==4237  
[2025-03-18 11:04:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:04:06 - End Time 2025-03-18 11:04:06  
[2025-03-18 11:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707734', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707734', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707734', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707734', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:04:21] Production.INFO: ProcessCDR(1,14707734,1,1,2)  
[2025-03-18 11:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707734,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707734,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707734,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:04:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707734,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707734', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707734', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:04:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:04:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:04:27] Production.INFO: ==22117== Releasing lock...  
[2025-03-18 11:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:04:27] Production.INFO: 59.75 MB  #Memory Used#   
[2025-03-18 11:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:05:05
    [end_date_ymd] => 2025-03-18 11:05:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:05:05' and `end` < '2025-03-18 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-18 11:05:19] Production.INFO: count ==4254  
[2025-03-18 11:05:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:05:05 - End Time 2025-03-18 11:05:05  
[2025-03-18 11:05:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707739', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707739', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707739', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707739', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:05:21] Production.INFO: ProcessCDR(1,14707739,1,1,2)  
[2025-03-18 11:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707739,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707739,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707739,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:05:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707739,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707739', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707739', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:05:25] Production.INFO: ==22267== Releasing lock...  
[2025-03-18 11:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:05:25] Production.INFO: 59.75 MB  #Memory Used#   
[2025-03-18 11:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:06:06
    [end_date_ymd] => 2025-03-18 11:06:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:06:06' and `end` < '2025-03-18 11: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-18 11:06:19] Production.INFO: count ==4273  
[2025-03-18 11:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:06:06 - End Time 2025-03-18 11:06:06  
[2025-03-18 11:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707744', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707744', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707744', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707744', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:06:21] Production.INFO: ProcessCDR(1,14707744,1,1,2)  
[2025-03-18 11:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707744,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707744,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707744,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:06:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707744,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707744', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707744', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:06:27] Production.INFO: ==22340== Releasing lock...  
[2025-03-18 11:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:06:27] Production.INFO: 60 MB  #Memory Used#   
[2025-03-18 11:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:07:06
    [end_date_ymd] => 2025-03-18 11:07:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:07:06' and `end` < '2025-03-18 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-18 11:07:19] Production.INFO: count ==4275  
[2025-03-18 11:07:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:07:06 - End Time 2025-03-18 11:07:06  
[2025-03-18 11:07:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707749', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707749', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707749', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707749', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:07:21] Production.INFO: ProcessCDR(1,14707749,1,1,2)  
[2025-03-18 11:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707749,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:07:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707749,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:07:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707749,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:07:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707749,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707749', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707749', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:07:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:07:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:07:27] Production.INFO: ==22410== Releasing lock...  
[2025-03-18 11:07:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:07:27] Production.INFO: 60 MB  #Memory Used#   
[2025-03-18 11:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:08:06
    [end_date_ymd] => 2025-03-18 11:08:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:08:06' and `end` < '2025-03-18 11: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-18 11:08:19] Production.INFO: count ==4296  
[2025-03-18 11:08:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:08:06 - End Time 2025-03-18 11:08:06  
[2025-03-18 11:08:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707754', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707754', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707754', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707754', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:08:21] Production.INFO: ProcessCDR(1,14707754,1,1,2)  
[2025-03-18 11:08:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:08:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:08:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:08:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707754', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:08:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707754', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:08:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:08:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:08:27] Production.INFO: ==22565== Releasing lock...  
[2025-03-18 11:08:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:08:27] Production.INFO: 60 MB  #Memory Used#   
[2025-03-18 11:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:09:06
    [end_date_ymd] => 2025-03-18 11:09:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:09:06' and `end` < '2025-03-18 11: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-18 11:09:19] Production.INFO: count ==4306  
[2025-03-18 11:09:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:09:06 - End Time 2025-03-18 11:09:06  
[2025-03-18 11:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707759', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707759', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:09:21] Production.INFO: ProcessCDR(1,14707759,1,1,2)  
[2025-03-18 11:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:09:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:09:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:09:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:09:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:09:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:09:27] Production.INFO: ==22637== Releasing lock...  
[2025-03-18 11:09:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:09:27] Production.INFO: 60.25 MB  #Memory Used#   
[2025-03-18 11:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:10:06
    [end_date_ymd] => 2025-03-18 11:10:06
    [RateCDR] => 1
)
  
[2025-03-18 11:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:10:06' and `end` < '2025-03-18 11:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:10:19] Production.INFO: count ==4320  
[2025-03-18 11:10:22] Production.ERROR: pbx CDR StartTime 2025-03-18 08:10:06 - End Time 2025-03-18 11:10:06  
[2025-03-18 11:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707764', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707764', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:10:22] Production.INFO: ProcessCDR(1,14707764,1,1,2)  
[2025-03-18 11:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:10:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:10:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:10:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:10:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:10:27] Production.INFO: ==22712== Releasing lock...  
[2025-03-18 11:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:10:27] Production.INFO: 60.25 MB  #Memory Used#   
[2025-03-18 11:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:11:05
    [end_date_ymd] => 2025-03-18 11:11:05
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:11:05' and `end` < '2025-03-18 11: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-18 11:11:18] Production.INFO: count ==4415  
[2025-03-18 11:11:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:11:05 - End Time 2025-03-18 11:11:05  
[2025-03-18 11:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707770', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707770', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707770', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707770', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:11:21] Production.INFO: ProcessCDR(1,14707770,1,1,2)  
[2025-03-18 11:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:11:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707770,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:11:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:11:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707770,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707770', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707770', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:11:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:11:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:11:26] Production.INFO: ==22789== Releasing lock...  
[2025-03-18 11:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:11:26] Production.INFO: 61 MB  #Memory Used#   
[2025-03-18 11:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:12:05
    [end_date_ymd] => 2025-03-18 11:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:12:05' and `end` < '2025-03-18 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-18 11:12:18] Production.INFO: count ==4420  
[2025-03-18 11:12:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:12:05 - End Time 2025-03-18 11:12:05  
[2025-03-18 11:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707775', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707775', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707775', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707775', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:12:21] Production.INFO: ProcessCDR(1,14707775,1,1,2)  
[2025-03-18 11:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707775,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707775,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707775,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707775,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707775', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707775', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:12:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:12:27] Production.INFO: ==22939== Releasing lock...  
[2025-03-18 11:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:12:27] Production.INFO: 61 MB  #Memory Used#   
[2025-03-18 11:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:13:05
    [end_date_ymd] => 2025-03-18 11:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:13:05' and `end` < '2025-03-18 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-18 11:13:19] Production.INFO: count ==4429  
[2025-03-18 11:13:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:13:05 - End Time 2025-03-18 11:13:05  
[2025-03-18 11:13:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707780', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707780', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707780', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707780', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:13:21] Production.INFO: ProcessCDR(1,14707780,1,1,2)  
[2025-03-18 11:13:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707780,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:13:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707780,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:13:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707780,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707780,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707780', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707780', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:13:25] Production.INFO: ==23009== Releasing lock...  
[2025-03-18 11:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:13:25] Production.INFO: 61 MB  #Memory Used#   
[2025-03-18 11:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:14:05
    [end_date_ymd] => 2025-03-18 11:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:14:05' and `end` < '2025-03-18 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-18 11:14:18] Production.INFO: count ==4414  
[2025-03-18 11:14:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:14:05 - End Time 2025-03-18 11:14:05  
[2025-03-18 11:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707785', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707785', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707785', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707785', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:14:21] Production.INFO: ProcessCDR(1,14707785,1,1,2)  
[2025-03-18 11:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:14:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:14:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:14:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707785', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707785', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:14:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:14:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:14:24] Production.INFO: ==23082== Releasing lock...  
[2025-03-18 11:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:14:24] Production.INFO: 61 MB  #Memory Used#   
[2025-03-18 11:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:15:06
    [end_date_ymd] => 2025-03-18 11:15:06
    [RateCDR] => 1
)
  
[2025-03-18 11:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:15:06' and `end` < '2025-03-18 11:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:15:19] Production.INFO: count ==4421  
[2025-03-18 11:15:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:15:06 - End Time 2025-03-18 11:15:06  
[2025-03-18 11:15:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707790', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707790', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707790', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707790', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:15:21] Production.INFO: ProcessCDR(1,14707790,1,1,2)  
[2025-03-18 11:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707790,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:15:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707790,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:15:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707790,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:15:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707790,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707790', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:15:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707790', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:15:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:15:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:15:27] Production.INFO: ==23234== Releasing lock...  
[2025-03-18 11:15:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:15:27] Production.INFO: 61 MB  #Memory Used#   
[2025-03-18 11:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:16:05
    [end_date_ymd] => 2025-03-18 11:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:16:05' and `end` < '2025-03-18 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-18 11:16:19] Production.INFO: count ==4432  
[2025-03-18 11:16:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:16:05 - End Time 2025-03-18 11:16:05  
[2025-03-18 11:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707795', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707795', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707795', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707795', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:16:21] Production.INFO: ProcessCDR(1,14707795,1,1,2)  
[2025-03-18 11:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:16:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:16:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707795', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:16:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707795', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:16:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:16:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:16:27] Production.INFO: ==23306== Releasing lock...  
[2025-03-18 11:16:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:16:27] Production.INFO: 61.25 MB  #Memory Used#   
[2025-03-18 11:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:17:06
    [end_date_ymd] => 2025-03-18 11:17:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:17:06' and `end` < '2025-03-18 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-18 11:17:19] Production.INFO: count ==4456  
[2025-03-18 11:17:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:17:06 - End Time 2025-03-18 11:17:06  
[2025-03-18 11:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707800', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707800', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707800', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707800', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:17:21] Production.INFO: ProcessCDR(1,14707800,1,1,2)  
[2025-03-18 11:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707800,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:17:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707800,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:17:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707800,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:17:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707800,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:17:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707800', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:17:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707800', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:17:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:17:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:17:28] Production.INFO: ==23378== Releasing lock...  
[2025-03-18 11:17:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:17:28] Production.INFO: 61.25 MB  #Memory Used#   
[2025-03-18 11:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:18:05
    [end_date_ymd] => 2025-03-18 11:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:18:05' and `end` < '2025-03-18 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-18 11:18:19] Production.INFO: count ==4467  
[2025-03-18 11:18:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:18:05 - End Time 2025-03-18 11:18:05  
[2025-03-18 11:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707805', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707805', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707805', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707805', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:18:21] Production.INFO: ProcessCDR(1,14707805,1,1,2)  
[2025-03-18 11:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707805,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:18:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707805,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:18:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707805,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707805,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707805', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707805', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:18:27] Production.INFO: ==23456== Releasing lock...  
[2025-03-18 11:18:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:18:27] Production.INFO: 61.5 MB  #Memory Used#   
[2025-03-18 11:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:19:06
    [end_date_ymd] => 2025-03-18 11:19:06
    [RateCDR] => 1
)
  
[2025-03-18 11:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:19:06' and `end` < '2025-03-18 11:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:19:19] Production.INFO: count ==4470  
[2025-03-18 11:19:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:19:06 - End Time 2025-03-18 11:19:06  
[2025-03-18 11:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707810', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707810', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:19:21] Production.INFO: ProcessCDR(1,14707810,1,1,2)  
[2025-03-18 11:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:19:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:19:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:19:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:19:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:19:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:19:27] Production.INFO: ==23529== Releasing lock...  
[2025-03-18 11:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:19:27] Production.INFO: 61.5 MB  #Memory Used#   
[2025-03-18 11:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:20:06
    [end_date_ymd] => 2025-03-18 11:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:20:06' and `end` < '2025-03-18 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-18 11:20:19] Production.INFO: count ==4486  
[2025-03-18 11:20:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:20:06 - End Time 2025-03-18 11:20:06  
[2025-03-18 11:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707815', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707815', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:20:21] Production.INFO: ProcessCDR(1,14707815,1,1,2)  
[2025-03-18 11:20:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:20:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:20:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:20:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:20:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:20:26] Production.INFO: ==23643== Releasing lock...  
[2025-03-18 11:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:20:26] Production.INFO: 61.5 MB  #Memory Used#   
[2025-03-18 11:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:21:06
    [end_date_ymd] => 2025-03-18 11:21:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:21:06' and `end` < '2025-03-18 11: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-18 11:21:19] Production.INFO: count ==4528  
[2025-03-18 11:21:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:21:06 - End Time 2025-03-18 11:21:06  
[2025-03-18 11:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707821', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707821', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707821', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707821', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:21:21] Production.INFO: ProcessCDR(1,14707821,1,1,2)  
[2025-03-18 11:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:21:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707821,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:21:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:21:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707821,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:21:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707821', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:21:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707821', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:21:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:21:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:21:28] Production.INFO: ==23721== Releasing lock...  
[2025-03-18 11:21:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:21:28] Production.INFO: 61.75 MB  #Memory Used#   
[2025-03-18 11:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:22:05
    [end_date_ymd] => 2025-03-18 11:22:05
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:22:05' and `end` < '2025-03-18 11: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-18 11:22:19] Production.INFO: count ==4543  
[2025-03-18 11:22:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:22:05 - End Time 2025-03-18 11:22:05  
[2025-03-18 11:22:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707826', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707826', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707826', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707826', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:22:21] Production.INFO: ProcessCDR(1,14707826,1,1,2)  
[2025-03-18 11:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707826,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:22:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707826,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:22:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707826,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:22:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707826,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:22:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707826', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:22:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707826', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:22:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:22:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:22:27] Production.INFO: ==23793== Releasing lock...  
[2025-03-18 11:22:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:22:27] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 11:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:23:06
    [end_date_ymd] => 2025-03-18 11:23:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:23:06' and `end` < '2025-03-18 11: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-18 11:23:19] Production.INFO: count ==4549  
[2025-03-18 11:23:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:23:06 - End Time 2025-03-18 11:23:06  
[2025-03-18 11:23:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707831', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707831', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707831', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707831', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:23:21] Production.INFO: ProcessCDR(1,14707831,1,1,2)  
[2025-03-18 11:23:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707831,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:23:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707831,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:23:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707831,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:23:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707831,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707831', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707831', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:23:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:23:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:23:27] Production.INFO: ==23863== Releasing lock...  
[2025-03-18 11:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:23:27] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 11:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:24:05
    [end_date_ymd] => 2025-03-18 11:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:24:05' and `end` < '2025-03-18 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-18 11:24:18] Production.INFO: count ==4544  
[2025-03-18 11:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:24:05 - End Time 2025-03-18 11:24:05  
[2025-03-18 11:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707836', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707836', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707836', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707836', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:24:21] Production.INFO: ProcessCDR(1,14707836,1,1,2)  
[2025-03-18 11:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707836,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707836,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707836,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707836,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707836', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707836', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:24:26] Production.INFO: ==23935== Releasing lock...  
[2025-03-18 11:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:24:26] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 11:25:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:25:06
    [end_date_ymd] => 2025-03-18 11:25:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:25:06' and `end` < '2025-03-18 11: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-18 11:25:19] Production.INFO: count ==4545  
[2025-03-18 11:25:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:25:06 - End Time 2025-03-18 11:25:06  
[2025-03-18 11:25:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707841', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707841', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707841', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707841', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:25:21] Production.INFO: ProcessCDR(1,14707841,1,1,2)  
[2025-03-18 11:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:25:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:25:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:25:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:25:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707841', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:25:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707841', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:25:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:25:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:25:27] Production.INFO: ==24009== Releasing lock...  
[2025-03-18 11:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:25:27] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 11:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:26:06
    [end_date_ymd] => 2025-03-18 11:26:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:26:06' and `end` < '2025-03-18 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-18 11:26:19] Production.INFO: count ==4552  
[2025-03-18 11:26:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:26:06 - End Time 2025-03-18 11:26:06  
[2025-03-18 11:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707846', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707846', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707846', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707846', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:26:21] Production.INFO: ProcessCDR(1,14707846,1,1,2)  
[2025-03-18 11:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707846,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:26:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707846,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:26:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707846,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:26:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707846,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707846', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:26:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707846', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:26:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:26:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:26:27] Production.INFO: ==24082== Releasing lock...  
[2025-03-18 11:26:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:26:27] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 11:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:27:06
    [end_date_ymd] => 2025-03-18 11:27:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:27:06' and `end` < '2025-03-18 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-18 11:27:19] Production.INFO: count ==4562  
[2025-03-18 11:27:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:27:06 - End Time 2025-03-18 11:27:06  
[2025-03-18 11:27:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707851', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707851', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707851', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707851', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:27:21] Production.INFO: ProcessCDR(1,14707851,1,1,2)  
[2025-03-18 11:27:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707851,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:27:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707851,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:27:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707851,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:27:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707851,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:27:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707851', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:27:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707851', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:27:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:27:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:27:28] Production.INFO: ==24155== Releasing lock...  
[2025-03-18 11:27:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:27:28] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 11:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:28:05
    [end_date_ymd] => 2025-03-18 11:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:28:05' and `end` < '2025-03-18 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-18 11:28:19] Production.INFO: count ==4566  
[2025-03-18 11:28:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:28:05 - End Time 2025-03-18 11:28:05  
[2025-03-18 11:28:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707856', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707856', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707856', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707856', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:28:21] Production.INFO: ProcessCDR(1,14707856,1,1,2)  
[2025-03-18 11:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:28:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:28:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:28:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:28:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707856', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:28:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707856', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:28:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:28:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:28:27] Production.INFO: ==24227== Releasing lock...  
[2025-03-18 11:28:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:28:27] Production.INFO: 62.25 MB  #Memory Used#   
[2025-03-18 11:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:29:06
    [end_date_ymd] => 2025-03-18 11:29:06
    [RateCDR] => 1
)
  
[2025-03-18 11:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:29:06' and `end` < '2025-03-18 11:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:29:19] Production.INFO: count ==4584  
[2025-03-18 11:29:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:29:06 - End Time 2025-03-18 11:29:06  
[2025-03-18 11:29:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707861', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707861', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:29:21] Production.INFO: ProcessCDR(1,14707861,1,1,2)  
[2025-03-18 11:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:29:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:29:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:29:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:29:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:29:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:29:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:29:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:29:27] Production.INFO: ==24299== Releasing lock...  
[2025-03-18 11:29:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:29:27] Production.INFO: 62.25 MB  #Memory Used#   
[2025-03-18 11:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:30:06
    [end_date_ymd] => 2025-03-18 11:30:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:30:06' and `end` < '2025-03-18 11: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-18 11:30:20] Production.INFO: count ==4592  
[2025-03-18 11:30:22] Production.ERROR: pbx CDR StartTime 2025-03-18 08:30:06 - End Time 2025-03-18 11:30:06  
[2025-03-18 11:30:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707867', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707867', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707867', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707867', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:30:22] Production.INFO: ProcessCDR(1,14707867,1,1,2)  
[2025-03-18 11:30:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:30:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707867,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:30:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:30:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707867,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707867', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707867', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:30:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:30:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:30:28] Production.INFO: ==24378== Releasing lock...  
[2025-03-18 11:30:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:30:28] Production.INFO: 62.25 MB  #Memory Used#   
[2025-03-18 11:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:31:06
    [end_date_ymd] => 2025-03-18 11:31:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:31:06' and `end` < '2025-03-18 11: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-18 11:31:19] Production.INFO: count ==4637  
[2025-03-18 11:31:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:31:06 - End Time 2025-03-18 11:31:06  
[2025-03-18 11:31:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707872', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707872', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707872', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707872', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:31:22] Production.INFO: ProcessCDR(1,14707872,1,1,2)  
[2025-03-18 11:31:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:31:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707872,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:31:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:31:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707872,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:31:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707872', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:31:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707872', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:31:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:31:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:31:27] Production.INFO: ==24462== Releasing lock...  
[2025-03-18 11:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:31:27] Production.INFO: 62.75 MB  #Memory Used#   
[2025-03-18 11:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:32:05
    [end_date_ymd] => 2025-03-18 11:32:05
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:32:05' and `end` < '2025-03-18 11: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-18 11:32:18] Production.INFO: count ==4646  
[2025-03-18 11:32:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:32:05 - End Time 2025-03-18 11:32:05  
[2025-03-18 11:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707877', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707877', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707877', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707877', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:32:21] Production.INFO: ProcessCDR(1,14707877,1,1,2)  
[2025-03-18 11:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707877,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:32:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707877,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:32:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707877,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707877,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707877', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707877', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:32:26] Production.INFO: ==24536== Releasing lock...  
[2025-03-18 11:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:32:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-03-18 11:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:33:05
    [end_date_ymd] => 2025-03-18 11:33:05
    [RateCDR] => 1
)
  
[2025-03-18 11:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:33:05' and `end` < '2025-03-18 11:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:33:19] Production.INFO: count ==4652  
[2025-03-18 11:33:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:33:05 - End Time 2025-03-18 11:33:05  
[2025-03-18 11:33:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707882', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707882', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707882', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707882', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:33:21] Production.INFO: ProcessCDR(1,14707882,1,1,2)  
[2025-03-18 11:33:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707882,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707882,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707882,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707882,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707882', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707882', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:33:25] Production.INFO: ==24609== Releasing lock...  
[2025-03-18 11:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:33:25] Production.INFO: 62.75 MB  #Memory Used#   
[2025-03-18 11:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:34:05
    [end_date_ymd] => 2025-03-18 11:34:05
    [RateCDR] => 1
)
  
[2025-03-18 11:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:34:05' and `end` < '2025-03-18 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-18 11:34:18] Production.INFO: count ==4673  
[2025-03-18 11:34:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:34:05 - End Time 2025-03-18 11:34:05  
[2025-03-18 11:34:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707887', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707887', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707887', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707887', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:34:21] Production.INFO: ProcessCDR(1,14707887,1,1,2)  
[2025-03-18 11:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:34:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:34:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707887', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:34:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707887', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:34:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:34:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:34:27] Production.INFO: ==24685== Releasing lock...  
[2025-03-18 11:34:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:34:27] Production.INFO: 63 MB  #Memory Used#   
[2025-03-18 11:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:35:06
    [end_date_ymd] => 2025-03-18 11:35:06
    [RateCDR] => 1
)
  
[2025-03-18 11:35:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:35:06' and `end` < '2025-03-18 11:35:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:35:19] Production.INFO: count ==4707  
[2025-03-18 11:35:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:35:06 - End Time 2025-03-18 11:35:06  
[2025-03-18 11:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707892', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707892', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707892', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707892', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:35:21] Production.INFO: ProcessCDR(1,14707892,1,1,2)  
[2025-03-18 11:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707892,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:35:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707892,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:35:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707892,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:35:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707892,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:35:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707892', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:35:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707892', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:35:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:35:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:35:27] Production.INFO: ==24800== Releasing lock...  
[2025-03-18 11:35:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:35:27] Production.INFO: 63.25 MB  #Memory Used#   
[2025-03-18 11:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:36:05
    [end_date_ymd] => 2025-03-18 11:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:36:05' and `end` < '2025-03-18 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-18 11:36:18] Production.INFO: count ==4717  
[2025-03-18 11:36:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:36:05 - End Time 2025-03-18 11:36:05  
[2025-03-18 11:36:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707897', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707897', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707897', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707897', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:36:21] Production.INFO: ProcessCDR(1,14707897,1,1,2)  
[2025-03-18 11:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707897,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:36:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707897,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:36:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707897,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707897,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707897', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:36:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707897', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:36:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:36:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:36:27] Production.INFO: ==24872== Releasing lock...  
[2025-03-18 11:36:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:36:27] Production.INFO: 63.25 MB  #Memory Used#   
[2025-03-18 11:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:37:06
    [end_date_ymd] => 2025-03-18 11:37:06
    [RateCDR] => 1
)
  
[2025-03-18 11:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:37:06' and `end` < '2025-03-18 11:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:37:19] Production.INFO: count ==4718  
[2025-03-18 11:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:37:06 - End Time 2025-03-18 11:37:06  
[2025-03-18 11:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707902', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707902', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707902', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707902', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:37:21] Production.INFO: ProcessCDR(1,14707902,1,1,2)  
[2025-03-18 11:37:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707902,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:37:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707902,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:37:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707902,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:37:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707902,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:37:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707902', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:37:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707902', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:37:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:37:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:37:27] Production.INFO: ==24952== Releasing lock...  
[2025-03-18 11:37:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:37:27] Production.INFO: 63.25 MB  #Memory Used#   
[2025-03-18 11:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:38:05
    [end_date_ymd] => 2025-03-18 11:38:05
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:38:05' and `end` < '2025-03-18 11: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-18 11:38:19] Production.INFO: count ==4762  
[2025-03-18 11:38:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:38:05 - End Time 2025-03-18 11:38:05  
[2025-03-18 11:38:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707907', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707907', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:38:21] Production.INFO: ProcessCDR(1,14707907,1,1,2)  
[2025-03-18 11:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:38:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:38:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:38:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:38:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:38:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:38:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:38:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:38:27] Production.INFO: ==25030== Releasing lock...  
[2025-03-18 11:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:38:27] Production.INFO: 63.5 MB  #Memory Used#   
[2025-03-18 11:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:39:05
    [end_date_ymd] => 2025-03-18 11:39:05
    [RateCDR] => 1
)
  
[2025-03-18 11:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:39:05' and `end` < '2025-03-18 11:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:39:18] Production.INFO: count ==4769  
[2025-03-18 11:39:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:39:05 - End Time 2025-03-18 11:39:05  
[2025-03-18 11:39:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707912', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707912', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:39:21] Production.INFO: ProcessCDR(1,14707912,1,1,2)  
[2025-03-18 11:39:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:39:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:39:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:39:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:39:25] Production.INFO: ==25109== Releasing lock...  
[2025-03-18 11:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:39:25] Production.INFO: 63.75 MB  #Memory Used#   
[2025-03-18 11:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:40:06
    [end_date_ymd] => 2025-03-18 11:40:06
    [RateCDR] => 1
)
  
[2025-03-18 11:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:40:06' and `end` < '2025-03-18 11:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:40:19] Production.INFO: count ==4762  
[2025-03-18 11:40:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:40:06 - End Time 2025-03-18 11:40:06  
[2025-03-18 11:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707918', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707918', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707918', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707918', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:40:21] Production.INFO: ProcessCDR(1,14707918,1,1,2)  
[2025-03-18 11:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707918,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707918,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707918', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707918', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:40:26] Production.INFO: ==25186== Releasing lock...  
[2025-03-18 11:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:40:26] Production.INFO: 63.5 MB  #Memory Used#   
[2025-03-18 11:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:41:05
    [end_date_ymd] => 2025-03-18 11:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:41:05' and `end` < '2025-03-18 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-18 11:41:18] Production.INFO: count ==4784  
[2025-03-18 11:41:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:41:05 - End Time 2025-03-18 11:41:05  
[2025-03-18 11:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707923', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707923', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707923', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707923', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:41:21] Production.INFO: ProcessCDR(1,14707923,1,1,2)  
[2025-03-18 11:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707923,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:41:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707923,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707923', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707923', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:41:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:41:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:41:25] Production.INFO: ==25268== Releasing lock...  
[2025-03-18 11:41:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:41:25] Production.INFO: 63.75 MB  #Memory Used#   
[2025-03-18 11:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:42:06
    [end_date_ymd] => 2025-03-18 11:42:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:42:06' and `end` < '2025-03-18 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-18 11:42:19] Production.INFO: count ==4779  
[2025-03-18 11:42:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:42:06 - End Time 2025-03-18 11:42:06  
[2025-03-18 11:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707928', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707928', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707928', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707928', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:42:21] Production.INFO: ProcessCDR(1,14707928,1,1,2)  
[2025-03-18 11:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707928,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:42:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707928,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:42:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707928,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707928,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707928', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707928', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:42:26] Production.INFO: ==25348== Releasing lock...  
[2025-03-18 11:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:42:26] Production.INFO: 63.75 MB  #Memory Used#   
[2025-03-18 11:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:43:05
    [end_date_ymd] => 2025-03-18 11:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:43:05' and `end` < '2025-03-18 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-18 11:43:18] Production.INFO: count ==4793  
[2025-03-18 11:43:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:43:05 - End Time 2025-03-18 11:43:05  
[2025-03-18 11:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707933', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707933', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707933', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707933', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:43:20] Production.INFO: ProcessCDR(1,14707933,1,1,2)  
[2025-03-18 11:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707933,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707933,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707933,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707933,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707933', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707933', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:43:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:43:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:43:26] Production.INFO: ==25421== Releasing lock...  
[2025-03-18 11:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:43:26] Production.INFO: 63.75 MB  #Memory Used#   
[2025-03-18 11:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:44:05
    [end_date_ymd] => 2025-03-18 11:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:44:05' and `end` < '2025-03-18 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-18 11:44:19] Production.INFO: count ==4804  
[2025-03-18 11:44:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:44:05 - End Time 2025-03-18 11:44:05  
[2025-03-18 11:44:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707938', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707938', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707938', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707938', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:44:21] Production.INFO: ProcessCDR(1,14707938,1,1,2)  
[2025-03-18 11:44:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707938,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707938,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707938,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:44:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707938,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707938', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707938', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:44:26] Production.INFO: ==25503== Releasing lock...  
[2025-03-18 11:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:44:26] Production.INFO: 64 MB  #Memory Used#   
[2025-03-18 11:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:45:06
    [end_date_ymd] => 2025-03-18 11:45:06
    [RateCDR] => 1
)
  
[2025-03-18 11:45:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:45:06' and `end` < '2025-03-18 11:45:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:45:19] Production.INFO: count ==4813  
[2025-03-18 11:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:45:06 - End Time 2025-03-18 11:45:06  
[2025-03-18 11:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707943', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707943', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707943', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707943', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:45:21] Production.INFO: ProcessCDR(1,14707943,1,1,2)  
[2025-03-18 11:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707943,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707943,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707943,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707943,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707943', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:45:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707943', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:45:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:45:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:45:27] Production.INFO: ==25586== Releasing lock...  
[2025-03-18 11:45:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:45:27] Production.INFO: 64 MB  #Memory Used#   
[2025-03-18 11:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:46:06
    [end_date_ymd] => 2025-03-18 11:46:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:46:06' and `end` < '2025-03-18 11: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-18 11:46:19] Production.INFO: count ==4819  
[2025-03-18 11:46:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:46:06 - End Time 2025-03-18 11:46:06  
[2025-03-18 11:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707948', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707948', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707948', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707948', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:46:21] Production.INFO: ProcessCDR(1,14707948,1,1,2)  
[2025-03-18 11:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707948,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:46:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707948,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:46:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707948,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707948,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707948', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:46:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707948', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:46:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:46:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:46:27] Production.INFO: ==25666== Releasing lock...  
[2025-03-18 11:46:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:46:27] Production.INFO: 64 MB  #Memory Used#   
[2025-03-18 11:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:47:06
    [end_date_ymd] => 2025-03-18 11:47:06
    [RateCDR] => 1
)
  
[2025-03-18 11:47:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:47:06' and `end` < '2025-03-18 11:47:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:47:19] Production.INFO: count ==4838  
[2025-03-18 11:47:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:47:06 - End Time 2025-03-18 11:47:06  
[2025-03-18 11:47:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707953', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707953', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707953', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707953', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:47:21] Production.INFO: ProcessCDR(1,14707953,1,1,2)  
[2025-03-18 11:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:47:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:47:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:47:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:47:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707953', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:47:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707953', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:47:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:47:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:47:27] Production.INFO: ==25751== Releasing lock...  
[2025-03-18 11:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:47:27] Production.INFO: 64.25 MB  #Memory Used#   
[2025-03-18 11:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:48:06
    [end_date_ymd] => 2025-03-18 11:48:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:48:06' and `end` < '2025-03-18 11: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-18 11:48:19] Production.INFO: count ==4849  
[2025-03-18 11:48:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:48:06 - End Time 2025-03-18 11:48:06  
[2025-03-18 11:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707958', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707958', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:48:21] Production.INFO: ProcessCDR(1,14707958,1,1,2)  
[2025-03-18 11:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:48:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:48:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:48:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:48:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:48:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:48:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:48:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:48:28] Production.INFO: ==25826== Releasing lock...  
[2025-03-18 11:48:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:48:28] Production.INFO: 64.25 MB  #Memory Used#   
[2025-03-18 11:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:49:05
    [end_date_ymd] => 2025-03-18 11:49:05
    [RateCDR] => 1
)
  
[2025-03-18 11:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:49:05' and `end` < '2025-03-18 11:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:49:19] Production.INFO: count ==4863  
[2025-03-18 11:49:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:49:05 - End Time 2025-03-18 11:49:05  
[2025-03-18 11:49:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707963', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707963', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:49:21] Production.INFO: ProcessCDR(1,14707963,1,1,2)  
[2025-03-18 11:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:49:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:49:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:49:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:49:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:49:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:49:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:49:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:49:27] Production.INFO: ==25906== Releasing lock...  
[2025-03-18 11:49:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:49:27] Production.INFO: 64.5 MB  #Memory Used#   
[2025-03-18 11:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:50:06
    [end_date_ymd] => 2025-03-18 11:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:50:06' and `end` < '2025-03-18 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-18 11:50:20] Production.INFO: count ==4879  
[2025-03-18 11:50:22] Production.ERROR: pbx CDR StartTime 2025-03-18 08:50:06 - End Time 2025-03-18 11:50:06  
[2025-03-18 11:50:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707969', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707969', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707969', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707969', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:50:22] Production.INFO: ProcessCDR(1,14707969,1,1,2)  
[2025-03-18 11:50:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:50:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707969,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:50:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:50:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707969,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:50:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707969', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:50:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707969', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:50:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:50:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:50:28] Production.INFO: ==25992== Releasing lock...  
[2025-03-18 11:50:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:50:28] Production.INFO: 64.5 MB  #Memory Used#   
[2025-03-18 11:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:51:06
    [end_date_ymd] => 2025-03-18 11:51:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:51:06' and `end` < '2025-03-18 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-18 11:51:19] Production.INFO: count ==4923  
[2025-03-18 11:51:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:51:06 - End Time 2025-03-18 11:51:06  
[2025-03-18 11:51:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707974', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707974', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707974', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707974', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:51:21] Production.INFO: ProcessCDR(1,14707974,1,1,2)  
[2025-03-18 11:51:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:51:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707974,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:51:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:51:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707974,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:51:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707974', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:51:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707974', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:51:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:51:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:51:27] Production.INFO: ==26119== Releasing lock...  
[2025-03-18 11:51:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:51:27] Production.INFO: 64.75 MB  #Memory Used#   
[2025-03-18 11:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:52:06
    [end_date_ymd] => 2025-03-18 11:52:06
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:52:06' and `end` < '2025-03-18 11: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-18 11:52:20] Production.INFO: count ==4930  
[2025-03-18 11:52:22] Production.ERROR: pbx CDR StartTime 2025-03-18 08:52:06 - End Time 2025-03-18 11:52:06  
[2025-03-18 11:52:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707979', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707979', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707979', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707979', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:52:22] Production.INFO: ProcessCDR(1,14707979,1,1,2)  
[2025-03-18 11:52:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:52:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707979,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:52:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:52:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707979,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:52:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707979', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:52:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707979', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:52:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:52:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:52:28] Production.INFO: ==26199== Releasing lock...  
[2025-03-18 11:52:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:52:28] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 11:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:53:06
    [end_date_ymd] => 2025-03-18 11:53:06
    [RateCDR] => 1
)
  
[2025-03-18 11:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:53:06' and `end` < '2025-03-18 11:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:53:19] Production.INFO: count ==4942  
[2025-03-18 11:53:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:53:06 - End Time 2025-03-18 11:53:06  
[2025-03-18 11:53:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707984', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707984', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707984', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:53:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707984', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:53:22] Production.INFO: ProcessCDR(1,14707984,1,1,2)  
[2025-03-18 11:53:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707984,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:53:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707984,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:53:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707984,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:53:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707984,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:53:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707984', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:53:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707984', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:53:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:53:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:53:27] Production.INFO: ==26279== Releasing lock...  
[2025-03-18 11:53:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:53:27] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 11:54:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:54:04
    [end_date_ymd] => 2025-03-18 11:54:04
    [RateCDR] => 1
)
  
[2025-03-18 11: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-18 08:54:04' and `end` < '2025-03-18 11: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-18 11:54:18] Production.INFO: count ==4960  
[2025-03-18 11:54:20] Production.ERROR: pbx CDR StartTime 2025-03-18 08:54:04 - End Time 2025-03-18 11:54:04  
[2025-03-18 11:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707989', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707989', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707989', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707989', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:54:20] Production.INFO: ProcessCDR(1,14707989,1,1,2)  
[2025-03-18 11:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707989,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:54:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707989,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:54:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707989,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707989,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707989', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707989', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:54:25] Production.INFO: ==26359== Releasing lock...  
[2025-03-18 11:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:54:25] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 11:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:55:05
    [end_date_ymd] => 2025-03-18 11:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:55:05' and `end` < '2025-03-18 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-18 11:55:19] Production.INFO: count ==4961  
[2025-03-18 11:55:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:55:05 - End Time 2025-03-18 11:55:05  
[2025-03-18 11:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707994', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707994', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707994', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707994', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:55:21] Production.INFO: ProcessCDR(1,14707994,1,1,2)  
[2025-03-18 11:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707994,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:55:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707994,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:55:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707994,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:55:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707994,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707994', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:55:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707994', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:55:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:55:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:55:27] Production.INFO: ==26447== Releasing lock...  
[2025-03-18 11:55:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:55:27] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 11:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:56:06
    [end_date_ymd] => 2025-03-18 11:56:06
    [RateCDR] => 1
)
  
[2025-03-18 11:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:56:06' and `end` < '2025-03-18 11:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:56:19] Production.INFO: count ==4967  
[2025-03-18 11:56:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:56:06 - End Time 2025-03-18 11:56:06  
[2025-03-18 11:56:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14707999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707999', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14707999', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:56:21] Production.INFO: ProcessCDR(1,14707999,1,1,2)  
[2025-03-18 11:56:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14707999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:56:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14707999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:56:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14707999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:56:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14707999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14707999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:56:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:56:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:56:26] Production.INFO: ==26530== Releasing lock...  
[2025-03-18 11:56:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:56:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 11:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:57:06
    [end_date_ymd] => 2025-03-18 11:57:06
    [RateCDR] => 1
)
  
[2025-03-18 11:57:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 08:57:06' and `end` < '2025-03-18 11:57:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 11:57:20] Production.INFO: count ==4952  
[2025-03-18 11:57:22] Production.ERROR: pbx CDR StartTime 2025-03-18 08:57:06 - End Time 2025-03-18 11:57:06  
[2025-03-18 11:57:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708004', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708004', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708004', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708004', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:57:22] Production.INFO: ProcessCDR(1,14708004,1,1,2)  
[2025-03-18 11:57:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708004,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:57:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708004,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:57:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708004,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:57:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708004,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708004', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708004', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:57:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:57:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:57:27] Production.INFO: ==26617== Releasing lock...  
[2025-03-18 11:57:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:57:27] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 11:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:58:05
    [end_date_ymd] => 2025-03-18 11:58:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:58:05' and `end` < '2025-03-18 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-18 11:58:19] Production.INFO: count ==4962  
[2025-03-18 11:58:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:58:05 - End Time 2025-03-18 11:58:05  
[2025-03-18 11:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708009', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708009', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708009', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708009', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:58:21] Production.INFO: ProcessCDR(1,14708009,1,1,2)  
[2025-03-18 11:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708009,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:58:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708009,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:58:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708009,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708009,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708009', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:58:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708009', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:58:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:58:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:58:27] Production.INFO: ==26698== Releasing lock...  
[2025-03-18 11:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:58:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 11:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 08:59:05
    [end_date_ymd] => 2025-03-18 11:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 08:59:05' and `end` < '2025-03-18 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-18 11:59:19] Production.INFO: count ==4968  
[2025-03-18 11:59:21] Production.ERROR: pbx CDR StartTime 2025-03-18 08:59:05 - End Time 2025-03-18 11:59:05  
[2025-03-18 11:59:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708012', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708012', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708012', 'tblTempVendorCDR_20' ) start  
[2025-03-18 11:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708012', 'tblTempVendorCDR_20' ) end  
[2025-03-18 11:59:21] Production.INFO: ProcessCDR(1,14708012,1,1,2)  
[2025-03-18 11:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:59:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 11:59:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:59:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 11:59:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708012', 'tblTempUsageDetail_20' ) start  
[2025-03-18 11:59:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708012', 'tblTempUsageDetail_20' ) end  
[2025-03-18 11:59:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 11:59:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 11:59:26] Production.INFO: ==26777== Releasing lock...  
[2025-03-18 11:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 11:59:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 12:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:00:06
    [end_date_ymd] => 2025-03-18 12:00:06
    [RateCDR] => 1
)
  
[2025-03-18 12:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:00:06' and `end` < '2025-03-18 12:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:00:19] Production.INFO: count ==4971  
[2025-03-18 12:00:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:00:06 - End Time 2025-03-18 12:00:06  
[2025-03-18 12:00:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708020', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708020', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708020', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708020', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:00:21] Production.INFO: ProcessCDR(1,14708020,1,1,2)  
[2025-03-18 12:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:00:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708020,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:00:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:00:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708020,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708020', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708020', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:00:27] Production.INFO: ==26863== Releasing lock...  
[2025-03-18 12:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:00:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 12:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:01:06
    [end_date_ymd] => 2025-03-18 12:01:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:01:06' and `end` < '2025-03-18 12: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-18 12:01:19] Production.INFO: count ==5013  
[2025-03-18 12:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:01:06 - End Time 2025-03-18 12:01:06  
[2025-03-18 12:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708025', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708025', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708025', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708025', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:01:21] Production.INFO: ProcessCDR(1,14708025,1,1,2)  
[2025-03-18 12:01:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:01:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708025,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:01:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:01:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708025,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708025', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708025', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:01:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:01:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:01:27] Production.INFO: ==26962== Releasing lock...  
[2025-03-18 12:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:01:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:02:05
    [end_date_ymd] => 2025-03-18 12:02:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:02:05' and `end` < '2025-03-18 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-18 12:02:18] Production.INFO: count ==5021  
[2025-03-18 12:02:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:02:05 - End Time 2025-03-18 12:02:05  
[2025-03-18 12:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708030', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708030', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708030', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708030', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:02:21] Production.INFO: ProcessCDR(1,14708030,1,1,2)  
[2025-03-18 12:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708030,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:02:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708030,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:02:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708030,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708030,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708030', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:02:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708030', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:02:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:02:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:02:27] Production.INFO: ==27044== Releasing lock...  
[2025-03-18 12:02:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:02:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:03:06
    [end_date_ymd] => 2025-03-18 12:03:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:03:06' and `end` < '2025-03-18 12: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-18 12:03:19] Production.INFO: count ==5017  
[2025-03-18 12:03:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:03:06 - End Time 2025-03-18 12:03:06  
[2025-03-18 12:03:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708035', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708035', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708035', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708035', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:03:21] Production.INFO: ProcessCDR(1,14708035,1,1,2)  
[2025-03-18 12:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708035,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:03:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708035,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:03:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708035,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:03:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708035,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:03:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708035', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:03:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708035', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:03:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:03:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:03:27] Production.INFO: ==27121== Releasing lock...  
[2025-03-18 12:03:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:03:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:04:05
    [end_date_ymd] => 2025-03-18 12:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:04:05' and `end` < '2025-03-18 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-18 12:04:18] Production.INFO: count ==5012  
[2025-03-18 12:04:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:04:05 - End Time 2025-03-18 12:04:05  
[2025-03-18 12:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708040', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708040', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708040', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708040', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:04:21] Production.INFO: ProcessCDR(1,14708040,1,1,2)  
[2025-03-18 12:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708040,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708040,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708040,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708040,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708040', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708040', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:04:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:04:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:04:26] Production.INFO: ==27205== Releasing lock...  
[2025-03-18 12:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:04:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:05:06
    [end_date_ymd] => 2025-03-18 12:05:06
    [RateCDR] => 1
)
  
[2025-03-18 12:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:05:06' and `end` < '2025-03-18 12:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:05:19] Production.INFO: count ==5024  
[2025-03-18 12:05:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:05:06 - End Time 2025-03-18 12:05:06  
[2025-03-18 12:05:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708045', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:05:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708045', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:05:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708045', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:05:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708045', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:05:22] Production.INFO: ProcessCDR(1,14708045,1,1,2)  
[2025-03-18 12:05:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708045,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:05:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708045,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:05:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708045,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:05:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708045,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:05:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708045', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:05:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708045', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:05:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:05:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:05:27] Production.INFO: ==27283== Releasing lock...  
[2025-03-18 12:05:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:05:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:06:05
    [end_date_ymd] => 2025-03-18 12:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:06:05' and `end` < '2025-03-18 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-18 12:06:19] Production.INFO: count ==5014  
[2025-03-18 12:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:06:05 - End Time 2025-03-18 12:06:05  
[2025-03-18 12:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708050', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708050', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708050', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708050', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:06:21] Production.INFO: ProcessCDR(1,14708050,1,1,2)  
[2025-03-18 12:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708050', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708050', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:06:27] Production.INFO: ==27399== Releasing lock...  
[2025-03-18 12:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:06:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:07:06
    [end_date_ymd] => 2025-03-18 12:07:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:07:06' and `end` < '2025-03-18 12: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-18 12:07:19] Production.INFO: count ==4997  
[2025-03-18 12:07:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:07:06 - End Time 2025-03-18 12:07:06  
[2025-03-18 12:07:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708055', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708055', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708055', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708055', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:07:21] Production.INFO: ProcessCDR(1,14708055,1,1,2)  
[2025-03-18 12:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708055,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:07:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708055,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:07:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708055,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:07:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708055,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708055', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708055', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:07:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:07:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:07:27] Production.INFO: ==27504== Releasing lock...  
[2025-03-18 12:07:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:07:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:08:05
    [end_date_ymd] => 2025-03-18 12:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:08:05' and `end` < '2025-03-18 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-18 12:08:18] Production.INFO: count ==4994  
[2025-03-18 12:08:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:08:05 - End Time 2025-03-18 12:08:05  
[2025-03-18 12:08:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708060', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708060', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708060', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708060', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:08:21] Production.INFO: ProcessCDR(1,14708060,1,1,2)  
[2025-03-18 12:08:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708060,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:08:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708060,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:08:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708060,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:08:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708060,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708060', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708060', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:08:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:08:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:08:26] Production.INFO: ==27585== Releasing lock...  
[2025-03-18 12:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:08:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:09:05
    [end_date_ymd] => 2025-03-18 12:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:09:05' and `end` < '2025-03-18 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-18 12:09:19] Production.INFO: count ==4981  
[2025-03-18 12:09:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:09:05 - End Time 2025-03-18 12:09:05  
[2025-03-18 12:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708065', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708065', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708065', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708065', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:09:21] Production.INFO: ProcessCDR(1,14708065,1,1,2)  
[2025-03-18 12:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:09:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:09:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708065', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708065', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:09:26] Production.INFO: ==27663== Releasing lock...  
[2025-03-18 12:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:09:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 12:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:10:06
    [end_date_ymd] => 2025-03-18 12:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:10:06' and `end` < '2025-03-18 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-18 12:10:19] Production.INFO: count ==4979  
[2025-03-18 12:10:22] Production.ERROR: pbx CDR StartTime 2025-03-18 09:10:06 - End Time 2025-03-18 12:10:06  
[2025-03-18 12:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708071', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708071', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708071', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708071', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:10:22] Production.INFO: ProcessCDR(1,14708071,1,1,2)  
[2025-03-18 12:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708071,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708071,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708071', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708071', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:10:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:10:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:10:27] Production.INFO: ==27744== Releasing lock...  
[2025-03-18 12:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:10:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 12:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:11:05
    [end_date_ymd] => 2025-03-18 12:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:11:05' and `end` < '2025-03-18 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-18 12:11:19] Production.INFO: count ==5000  
[2025-03-18 12:11:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:11:05 - End Time 2025-03-18 12:11:05  
[2025-03-18 12:11:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708076', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708076', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708076', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708076', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:11:21] Production.INFO: ProcessCDR(1,14708076,1,1,2)  
[2025-03-18 12:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:11:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708076,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:11:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:11:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708076,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708076', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708076', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:11:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:11:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:11:26] Production.INFO: ==27825== Releasing lock...  
[2025-03-18 12:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:11:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:12:05
    [end_date_ymd] => 2025-03-18 12:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:12:05' and `end` < '2025-03-18 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-18 12:12:18] Production.INFO: count ==5006  
[2025-03-18 12:12:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:12:05 - End Time 2025-03-18 12:12:05  
[2025-03-18 12:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708081', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708081', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708081', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708081', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:12:21] Production.INFO: ProcessCDR(1,14708081,1,1,2)  
[2025-03-18 12:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708081,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:12:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708081,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:12:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708081,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708081,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708081', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708081', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:12:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:12:27] Production.INFO: ==27907== Releasing lock...  
[2025-03-18 12:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:12:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:13:05
    [end_date_ymd] => 2025-03-18 12:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:13:05' and `end` < '2025-03-18 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-18 12:13:18] Production.INFO: count ==5005  
[2025-03-18 12:13:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:13:05 - End Time 2025-03-18 12:13:05  
[2025-03-18 12:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708086', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708086', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708086', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708086', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:13:20] Production.INFO: ProcessCDR(1,14708086,1,1,2)  
[2025-03-18 12:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708086,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708086,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708086,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:13:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708086,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708086', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708086', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:13:26] Production.INFO: ==27986== Releasing lock...  
[2025-03-18 12:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:13:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:14:05
    [end_date_ymd] => 2025-03-18 12:14:05
    [RateCDR] => 1
)
  
[2025-03-18 12:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:14:05' and `end` < '2025-03-18 12:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:14:19] Production.INFO: count ==5004  
[2025-03-18 12:14:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:14:05 - End Time 2025-03-18 12:14:05  
[2025-03-18 12:14:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708091', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708091', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708091', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708091', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:14:21] Production.INFO: ProcessCDR(1,14708091,1,1,2)  
[2025-03-18 12:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708091,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:14:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708091,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:14:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708091,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:14:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708091,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708091', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708091', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:14:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:14:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:14:26] Production.INFO: ==28070== Releasing lock...  
[2025-03-18 12:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:14:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:15:06
    [end_date_ymd] => 2025-03-18 12:15:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:15:06' and `end` < '2025-03-18 12: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-18 12:15:19] Production.INFO: count ==5019  
[2025-03-18 12:15:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:15:06 - End Time 2025-03-18 12:15:06  
[2025-03-18 12:15:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708096', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708096', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708096', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:15:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708096', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:15:22] Production.INFO: ProcessCDR(1,14708096,1,1,2)  
[2025-03-18 12:15:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708096,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:15:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708096,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:15:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708096,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:15:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708096,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708096', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708096', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:15:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:15:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:15:26] Production.INFO: ==28149== Releasing lock...  
[2025-03-18 12:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:15:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:16:05
    [end_date_ymd] => 2025-03-18 12:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:16:05' and `end` < '2025-03-18 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-18 12:16:18] Production.INFO: count ==5024  
[2025-03-18 12:16:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:16:05 - End Time 2025-03-18 12:16:05  
[2025-03-18 12:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708101', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708101', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708101', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708101', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:16:21] Production.INFO: ProcessCDR(1,14708101,1,1,2)  
[2025-03-18 12:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708101,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708101,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708101,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708101,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708101', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708101', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:16:26] Production.INFO: ==28234== Releasing lock...  
[2025-03-18 12:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:16:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:17:05
    [end_date_ymd] => 2025-03-18 12:17:05
    [RateCDR] => 1
)
  
[2025-03-18 12:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:17:05' and `end` < '2025-03-18 12:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:17:18] Production.INFO: count ==5030  
[2025-03-18 12:17:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:17:05 - End Time 2025-03-18 12:17:05  
[2025-03-18 12:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708106', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708106', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708106', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708106', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:17:20] Production.INFO: ProcessCDR(1,14708106,1,1,2)  
[2025-03-18 12:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708106', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708106', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:17:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:17:26] Production.INFO: ==28320== Releasing lock...  
[2025-03-18 12:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:17:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:18:05
    [end_date_ymd] => 2025-03-18 12:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:18:05' and `end` < '2025-03-18 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-18 12:18:19] Production.INFO: count ==5031  
[2025-03-18 12:18:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:18:05 - End Time 2025-03-18 12:18:05  
[2025-03-18 12:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708111', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708111', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708111', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708111', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:18:21] Production.INFO: ProcessCDR(1,14708111,1,1,2)  
[2025-03-18 12:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:18:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:18:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708111', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708111', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:18:26] Production.INFO: ==28397== Releasing lock...  
[2025-03-18 12:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:18:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:19:05
    [end_date_ymd] => 2025-03-18 12:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:19:05' and `end` < '2025-03-18 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-18 12:19:18] Production.INFO: count ==5031  
[2025-03-18 12:19:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:19:05 - End Time 2025-03-18 12:19:05  
[2025-03-18 12:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708116', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708116', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708116', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708116', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:19:20] Production.INFO: ProcessCDR(1,14708116,1,1,2)  
[2025-03-18 12:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:19:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708116', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708116', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:19:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:19:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:19:25] Production.INFO: ==28479== Releasing lock...  
[2025-03-18 12:19:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:19:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:20:07
    [end_date_ymd] => 2025-03-18 12:20:07
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:20:07' and `end` < '2025-03-18 12: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-18 12:20:20] Production.INFO: count ==5031  
[2025-03-18 12:20:22] Production.ERROR: pbx CDR StartTime 2025-03-18 09:20:07 - End Time 2025-03-18 12:20:07  
[2025-03-18 12:20:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708121', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708121', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708121', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708121', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:20:22] Production.INFO: ProcessCDR(1,14708121,1,1,2)  
[2025-03-18 12:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:20:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:20:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:20:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708121', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:20:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708121', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:20:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:20:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:20:28] Production.INFO: ==28558== Releasing lock...  
[2025-03-18 12:20:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:20:28] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:21:05
    [end_date_ymd] => 2025-03-18 12:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:21:05' and `end` < '2025-03-18 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-18 12:21:18] Production.INFO: count ==5055  
[2025-03-18 12:21:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:21:05 - End Time 2025-03-18 12:21:05  
[2025-03-18 12:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708127', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708127', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708127', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708127', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:21:20] Production.INFO: ProcessCDR(1,14708127,1,1,2)  
[2025-03-18 12:21:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708127,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708127,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708127,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:21:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708127,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708127', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708127', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:21:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:21:26] Production.INFO: ==28631== Releasing lock...  
[2025-03-18 12:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:21:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:22:06
    [end_date_ymd] => 2025-03-18 12:22:06
    [RateCDR] => 1
)
  
[2025-03-18 12:22:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:22:06' and `end` < '2025-03-18 12:22:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:22:19] Production.INFO: count ==5042  
[2025-03-18 12:22:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:22:06 - End Time 2025-03-18 12:22:06  
[2025-03-18 12:22:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708132', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708132', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708132', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708132', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:22:21] Production.INFO: ProcessCDR(1,14708132,1,1,2)  
[2025-03-18 12:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:22:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708132,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:22:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:22:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708132,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708132', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708132', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:22:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:22:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:22:26] Production.INFO: ==28746== Releasing lock...  
[2025-03-18 12:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:22:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:23:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:23:04
    [end_date_ymd] => 2025-03-18 12:23:04
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:23:04' and `end` < '2025-03-18 12: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-18 12:23:18] Production.INFO: count ==5046  
[2025-03-18 12:23:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:23:04 - End Time 2025-03-18 12:23:04  
[2025-03-18 12:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708137', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708137', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708137', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708137', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:23:20] Production.INFO: ProcessCDR(1,14708137,1,1,2)  
[2025-03-18 12:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708137,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:23:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708137,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:23:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708137,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708137,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708137', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708137', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:23:25] Production.INFO: ==28824== Releasing lock...  
[2025-03-18 12:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:23:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:24:06
    [end_date_ymd] => 2025-03-18 12:24:06
    [RateCDR] => 1
)
  
[2025-03-18 12:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:24:06' and `end` < '2025-03-18 12:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:24:19] Production.INFO: count ==5049  
[2025-03-18 12:24:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:24:06 - End Time 2025-03-18 12:24:06  
[2025-03-18 12:24:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708142', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708142', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708142', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708142', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:24:21] Production.INFO: ProcessCDR(1,14708142,1,1,2)  
[2025-03-18 12:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:24:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:24:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708142', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:24:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708142', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:24:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:24:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:24:27] Production.INFO: ==28898== Releasing lock...  
[2025-03-18 12:24:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:24:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:25:05
    [end_date_ymd] => 2025-03-18 12:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:25:05' and `end` < '2025-03-18 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-18 12:25:18] Production.INFO: count ==5058  
[2025-03-18 12:25:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:25:05 - End Time 2025-03-18 12:25:05  
[2025-03-18 12:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708147', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708147', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708147', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708147', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:25:20] Production.INFO: ProcessCDR(1,14708147,1,1,2)  
[2025-03-18 12:25:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708147,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708147,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708147,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708147,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708147', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708147', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:25:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:25:26] Production.INFO: ==28968== Releasing lock...  
[2025-03-18 12:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:25:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:26:05
    [end_date_ymd] => 2025-03-18 12:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:26:05' and `end` < '2025-03-18 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-18 12:26:19] Production.INFO: count ==5062  
[2025-03-18 12:26:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:26:05 - End Time 2025-03-18 12:26:05  
[2025-03-18 12:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708152', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708152', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708152', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708152', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:26:21] Production.INFO: ProcessCDR(1,14708152,1,1,2)  
[2025-03-18 12:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708152,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:26:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708152,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:26:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708152,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:26:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708152,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:26:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708152', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:26:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708152', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:26:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:26:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:26:27] Production.INFO: ==29046== Releasing lock...  
[2025-03-18 12:26:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:26:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:27:05
    [end_date_ymd] => 2025-03-18 12:27:05
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:27:05' and `end` < '2025-03-18 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-18 12:27:19] Production.INFO: count ==5053  
[2025-03-18 12:27:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:27:05 - End Time 2025-03-18 12:27:05  
[2025-03-18 12:27:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708157', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708157', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708157', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708157', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:27:21] Production.INFO: ProcessCDR(1,14708157,1,1,2)  
[2025-03-18 12:27:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708157,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:27:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708157,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:27:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708157,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:27:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708157,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:27:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708157', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:27:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708157', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:27:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:27:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:27:27] Production.INFO: ==29124== Releasing lock...  
[2025-03-18 12:27:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:27:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:28:06
    [end_date_ymd] => 2025-03-18 12:28:06
    [RateCDR] => 1
)
  
[2025-03-18 12:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:28:06' and `end` < '2025-03-18 12:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:28:19] Production.INFO: count ==5053  
[2025-03-18 12:28:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:28:06 - End Time 2025-03-18 12:28:06  
[2025-03-18 12:28:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708162', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708162', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708162', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708162', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:28:21] Production.INFO: ProcessCDR(1,14708162,1,1,2)  
[2025-03-18 12:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:28:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:28:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:28:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:28:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708162', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:28:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708162', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:28:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:28:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:28:27] Production.INFO: ==29198== Releasing lock...  
[2025-03-18 12:28:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:28:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:29:05
    [end_date_ymd] => 2025-03-18 12:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:29:05' and `end` < '2025-03-18 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-18 12:29:18] Production.INFO: count ==5065  
[2025-03-18 12:29:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:29:05 - End Time 2025-03-18 12:29:05  
[2025-03-18 12:29:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708167', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708167', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708167', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708167', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:29:21] Production.INFO: ProcessCDR(1,14708167,1,1,2)  
[2025-03-18 12:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:29:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708167', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708167', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:29:26] Production.INFO: ==29269== Releasing lock...  
[2025-03-18 12:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:29:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:30:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:30:07
    [end_date_ymd] => 2025-03-18 12:30:07
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:30:07' and `end` < '2025-03-18 12: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-18 12:30:20] Production.INFO: count ==5069  
[2025-03-18 12:30:22] Production.ERROR: pbx CDR StartTime 2025-03-18 09:30:07 - End Time 2025-03-18 12:30:07  
[2025-03-18 12:30:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708173', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708173', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708173', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708173', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:30:22] Production.INFO: ProcessCDR(1,14708173,1,1,2)  
[2025-03-18 12:30:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:30:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708173,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:30:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:30:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708173,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:30:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708173', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:30:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708173', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:30:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:30:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:30:28] Production.INFO: ==29349== Releasing lock...  
[2025-03-18 12:30:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:30:28] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:31:05
    [end_date_ymd] => 2025-03-18 12:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:31:05' and `end` < '2025-03-18 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-18 12:31:18] Production.INFO: count ==5083  
[2025-03-18 12:31:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:31:05 - End Time 2025-03-18 12:31:05  
[2025-03-18 12:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708178', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708178', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708178', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708178', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:31:21] Production.INFO: ProcessCDR(1,14708178,1,1,2)  
[2025-03-18 12:31:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708178,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:31:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708178,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708178', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708178', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:31:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:31:26] Production.INFO: ==29426== Releasing lock...  
[2025-03-18 12:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:31:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:32:05
    [end_date_ymd] => 2025-03-18 12:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:32:05' and `end` < '2025-03-18 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-18 12:32:19] Production.INFO: count ==5071  
[2025-03-18 12:32:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:32:05 - End Time 2025-03-18 12:32:05  
[2025-03-18 12:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708183', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708183', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708183', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708183', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:32:21] Production.INFO: ProcessCDR(1,14708183,1,1,2)  
[2025-03-18 12:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:32:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708183,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:32:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708183,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708183', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708183', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:32:25] Production.INFO: ==29518== Releasing lock...  
[2025-03-18 12:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:32:25] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:33:06
    [end_date_ymd] => 2025-03-18 12:33:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:33:06' and `end` < '2025-03-18 12: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-18 12:33:19] Production.INFO: count ==5066  
[2025-03-18 12:33:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:33:06 - End Time 2025-03-18 12:33:06  
[2025-03-18 12:33:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708188', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:33:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708188', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:33:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708188', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:33:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708188', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:33:22] Production.INFO: ProcessCDR(1,14708188,1,1,2)  
[2025-03-18 12:33:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708188,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:33:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708188,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:33:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708188,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:33:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708188,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:33:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708188', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:33:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708188', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:33:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:33:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:33:27] Production.INFO: ==29599== Releasing lock...  
[2025-03-18 12:33:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:33:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:34:05
    [end_date_ymd] => 2025-03-18 12:34:05
    [RateCDR] => 1
)
  
[2025-03-18 12:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:34:05' and `end` < '2025-03-18 12:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:34:18] Production.INFO: count ==5075  
[2025-03-18 12:34:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:34:05 - End Time 2025-03-18 12:34:05  
[2025-03-18 12:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708193', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708193', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708193', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708193', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:34:21] Production.INFO: ProcessCDR(1,14708193,1,1,2)  
[2025-03-18 12:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708193', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708193', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:34:26] Production.INFO: ==29674== Releasing lock...  
[2025-03-18 12:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:34:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:35:05
    [end_date_ymd] => 2025-03-18 12:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:35:05' and `end` < '2025-03-18 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-18 12:35:19] Production.INFO: count ==5085  
[2025-03-18 12:35:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:35:05 - End Time 2025-03-18 12:35:05  
[2025-03-18 12:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708198', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708198', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708198', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708198', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:35:21] Production.INFO: ProcessCDR(1,14708198,1,1,2)  
[2025-03-18 12:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708198,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:35:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708198,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:35:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708198,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:35:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708198,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708198', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708198', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:35:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:35:26] Production.INFO: ==29751== Releasing lock...  
[2025-03-18 12:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:35:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:36:05
    [end_date_ymd] => 2025-03-18 12:36:05
    [RateCDR] => 1
)
  
[2025-03-18 12:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:36:05' and `end` < '2025-03-18 12:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:36:18] Production.INFO: count ==5095  
[2025-03-18 12:36:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:36:05 - End Time 2025-03-18 12:36:05  
[2025-03-18 12:36:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708203', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708203', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708203', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708203', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:36:21] Production.INFO: ProcessCDR(1,14708203,1,1,2)  
[2025-03-18 12:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708203,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708203,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708203,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708203,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708203', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708203', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:36:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:36:27] Production.INFO: ==29829== Releasing lock...  
[2025-03-18 12:36:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:36:27] Production.INFO: 66.25 MB  #Memory Used#   
[2025-03-18 12:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:37:06
    [end_date_ymd] => 2025-03-18 12:37:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:37:06' and `end` < '2025-03-18 12: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-18 12:37:19] Production.INFO: count ==5065  
[2025-03-18 12:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:37:06 - End Time 2025-03-18 12:37:06  
[2025-03-18 12:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708208', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708208', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708208', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708208', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:37:21] Production.INFO: ProcessCDR(1,14708208,1,1,2)  
[2025-03-18 12:37:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708208,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:37:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708208,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:37:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708208,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:37:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708208,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:37:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708208', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:37:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708208', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:37:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:37:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:37:27] Production.INFO: ==29947== Releasing lock...  
[2025-03-18 12:37:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:37:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:38:05
    [end_date_ymd] => 2025-03-18 12:38:05
    [RateCDR] => 1
)
  
[2025-03-18 12:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:38:05' and `end` < '2025-03-18 12:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:38:19] Production.INFO: count ==5054  
[2025-03-18 12:38:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:38:05 - End Time 2025-03-18 12:38:05  
[2025-03-18 12:38:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708213', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708213', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708213', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708213', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:38:21] Production.INFO: ProcessCDR(1,14708213,1,1,2)  
[2025-03-18 12:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708213,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:38:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708213,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:38:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708213,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:38:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708213,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708213', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:38:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708213', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:38:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:38:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:38:27] Production.INFO: ==30022== Releasing lock...  
[2025-03-18 12:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:38:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:39:05
    [end_date_ymd] => 2025-03-18 12:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:39:05' and `end` < '2025-03-18 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-18 12:39:19] Production.INFO: count ==5041  
[2025-03-18 12:39:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:39:05 - End Time 2025-03-18 12:39:05  
[2025-03-18 12:39:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708218', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708218', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708218', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708218', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:39:21] Production.INFO: ProcessCDR(1,14708218,1,1,2)  
[2025-03-18 12:39:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:39:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:39:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:39:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708218', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:39:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708218', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:39:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:39:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:39:27] Production.INFO: ==30098== Releasing lock...  
[2025-03-18 12:39:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:39:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:40:06
    [end_date_ymd] => 2025-03-18 12:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:40:06' and `end` < '2025-03-18 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-18 12:40:19] Production.INFO: count ==5060  
[2025-03-18 12:40:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:40:06 - End Time 2025-03-18 12:40:06  
[2025-03-18 12:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708223', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708223', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708223', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708223', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:40:21] Production.INFO: ProcessCDR(1,14708223,1,1,2)  
[2025-03-18 12:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708223', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:40:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708223', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:40:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:40:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:40:27] Production.INFO: ==30179== Releasing lock...  
[2025-03-18 12:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:40:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:41:05
    [end_date_ymd] => 2025-03-18 12:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:41:05' and `end` < '2025-03-18 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-18 12:41:18] Production.INFO: count ==5038  
[2025-03-18 12:41:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:41:05 - End Time 2025-03-18 12:41:05  
[2025-03-18 12:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708229', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708229', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708229', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708229', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:41:21] Production.INFO: ProcessCDR(1,14708229,1,1,2)  
[2025-03-18 12:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708229,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708229,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708229', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708229', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:41:26] Production.INFO: ==30261== Releasing lock...  
[2025-03-18 12:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:41:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:42:05
    [end_date_ymd] => 2025-03-18 12:42:05
    [RateCDR] => 1
)
  
[2025-03-18 12:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:42:05' and `end` < '2025-03-18 12:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:42:18] Production.INFO: count ==5030  
[2025-03-18 12:42:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:42:05 - End Time 2025-03-18 12:42:05  
[2025-03-18 12:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708234', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708234', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708234', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708234', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:42:21] Production.INFO: ProcessCDR(1,14708234,1,1,2)  
[2025-03-18 12:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708234,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708234,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708234,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708234,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708234', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708234', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:42:26] Production.INFO: ==30334== Releasing lock...  
[2025-03-18 12:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:42:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:43:06
    [end_date_ymd] => 2025-03-18 12:43:06
    [RateCDR] => 1
)
  
[2025-03-18 12:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:43:06' and `end` < '2025-03-18 12:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:43:19] Production.INFO: count ==5023  
[2025-03-18 12:43:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:43:06 - End Time 2025-03-18 12:43:06  
[2025-03-18 12:43:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708239', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708239', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708239', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708239', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:43:21] Production.INFO: ProcessCDR(1,14708239,1,1,2)  
[2025-03-18 12:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708239,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708239,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708239,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708239,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708239', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708239', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:43:25] Production.INFO: ==30411== Releasing lock...  
[2025-03-18 12:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:43:25] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:44:05
    [end_date_ymd] => 2025-03-18 12:44:05
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:44:05' and `end` < '2025-03-18 12: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-18 12:44:18] Production.INFO: count ==5025  
[2025-03-18 12:44:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:44:05 - End Time 2025-03-18 12:44:05  
[2025-03-18 12:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708244', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708244', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708244', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708244', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:44:20] Production.INFO: ProcessCDR(1,14708244,1,1,2)  
[2025-03-18 12:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708244,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708244,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708244,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708244,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708244', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708244', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:44:26] Production.INFO: ==30484== Releasing lock...  
[2025-03-18 12:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:44:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:45:05
    [end_date_ymd] => 2025-03-18 12:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:45:05' and `end` < '2025-03-18 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-18 12:45:19] Production.INFO: count ==5084  
[2025-03-18 12:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:45:05 - End Time 2025-03-18 12:45:05  
[2025-03-18 12:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708249', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708249', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708249', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708249', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:45:21] Production.INFO: ProcessCDR(1,14708249,1,1,2)  
[2025-03-18 12:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708249,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708249,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708249,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708249,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708249', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708249', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:45:26] Production.INFO: ==30560== Releasing lock...  
[2025-03-18 12:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:45:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:46:05
    [end_date_ymd] => 2025-03-18 12:46:05
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:46:05' and `end` < '2025-03-18 12: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-18 12:46:18] Production.INFO: count ==5084  
[2025-03-18 12:46:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:46:05 - End Time 2025-03-18 12:46:05  
[2025-03-18 12:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708254', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708254', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708254', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708254', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:46:20] Production.INFO: ProcessCDR(1,14708254,1,1,2)  
[2025-03-18 12:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:46:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:46:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:46:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708254', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708254', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:46:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:46:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:46:24] Production.INFO: ==30636== Releasing lock...  
[2025-03-18 12:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:46:24] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:47:05
    [end_date_ymd] => 2025-03-18 12:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:47:05' and `end` < '2025-03-18 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-18 12:47:19] Production.INFO: count ==5081  
[2025-03-18 12:47:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:47:05 - End Time 2025-03-18 12:47:05  
[2025-03-18 12:47:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708259', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708259', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708259', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708259', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:47:21] Production.INFO: ProcessCDR(1,14708259,1,1,2)  
[2025-03-18 12:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708259,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:47:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708259,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:47:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708259,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:47:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708259,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:47:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708259', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:47:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708259', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:47:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:47:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:47:27] Production.INFO: ==30734== Releasing lock...  
[2025-03-18 12:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:47:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:48:05
    [end_date_ymd] => 2025-03-18 12:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:48:05' and `end` < '2025-03-18 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-18 12:48:18] Production.INFO: count ==5076  
[2025-03-18 12:48:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:48:05 - End Time 2025-03-18 12:48:05  
[2025-03-18 12:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708264', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708264', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708264', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708264', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:48:21] Production.INFO: ProcessCDR(1,14708264,1,1,2)  
[2025-03-18 12:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708264,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708264,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708264,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708264,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708264', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708264', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:48:26] Production.INFO: ==30807== Releasing lock...  
[2025-03-18 12:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:48:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:49:05
    [end_date_ymd] => 2025-03-18 12:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:49:05' and `end` < '2025-03-18 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-18 12:49:18] Production.INFO: count ==5054  
[2025-03-18 12:49:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:49:05 - End Time 2025-03-18 12:49:05  
[2025-03-18 12:49:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708269', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708269', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708269', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708269', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:49:21] Production.INFO: ProcessCDR(1,14708269,1,1,2)  
[2025-03-18 12:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:49:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:49:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:49:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708269', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708269', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:49:26] Production.INFO: ==30881== Releasing lock...  
[2025-03-18 12:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:49:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:50:06
    [end_date_ymd] => 2025-03-18 12:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:50:06' and `end` < '2025-03-18 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-18 12:50:19] Production.INFO: count ==5067  
[2025-03-18 12:50:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:50:06 - End Time 2025-03-18 12:50:06  
[2025-03-18 12:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708275', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708275', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708275', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708275', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:50:21] Production.INFO: ProcessCDR(1,14708275,1,1,2)  
[2025-03-18 12:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:50:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708275,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:50:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708275,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708275', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708275', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:50:26] Production.INFO: ==30957== Releasing lock...  
[2025-03-18 12:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:50:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 12:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:51:05
    [end_date_ymd] => 2025-03-18 12:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:51:05' and `end` < '2025-03-18 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-18 12:51:18] Production.INFO: count ==5036  
[2025-03-18 12:51:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:51:05 - End Time 2025-03-18 12:51:05  
[2025-03-18 12:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708280', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708280', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708280', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708280', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:51:20] Production.INFO: ProcessCDR(1,14708280,1,1,2)  
[2025-03-18 12:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708280,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708280,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708280', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708280', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:51:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:51:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:51:25] Production.INFO: ==31035== Releasing lock...  
[2025-03-18 12:51:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:51:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 12:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:52:06
    [end_date_ymd] => 2025-03-18 12:52:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:52:06' and `end` < '2025-03-18 12: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-18 12:52:19] Production.INFO: count ==5018  
[2025-03-18 12:52:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:52:06 - End Time 2025-03-18 12:52:06  
[2025-03-18 12:52:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708285', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708285', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708285', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:52:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708285', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:52:22] Production.INFO: ProcessCDR(1,14708285,1,1,2)  
[2025-03-18 12:52:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708285,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:52:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708285,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:52:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708285,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:52:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708285,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:52:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708285', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:52:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708285', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:52:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:52:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:52:27] Production.INFO: ==31153== Releasing lock...  
[2025-03-18 12:52:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:52:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:53:05
    [end_date_ymd] => 2025-03-18 12:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:53:05' and `end` < '2025-03-18 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-18 12:53:18] Production.INFO: count ==5017  
[2025-03-18 12:53:20] Production.ERROR: pbx CDR StartTime 2025-03-18 09:53:05 - End Time 2025-03-18 12:53:05  
[2025-03-18 12:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708290', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708290', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708290', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708290', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:53:20] Production.INFO: ProcessCDR(1,14708290,1,1,2)  
[2025-03-18 12:53:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708290,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708290,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708290,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708290,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708290', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708290', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:53:26] Production.INFO: ==31234== Releasing lock...  
[2025-03-18 12:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:53:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:54:06
    [end_date_ymd] => 2025-03-18 12:54:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:54:06' and `end` < '2025-03-18 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-18 12:54:19] Production.INFO: count ==5015  
[2025-03-18 12:54:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:54:06 - End Time 2025-03-18 12:54:06  
[2025-03-18 12:54:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708295', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:54:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708295', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:54:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708295', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:54:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708295', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:54:22] Production.INFO: ProcessCDR(1,14708295,1,1,2)  
[2025-03-18 12:54:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708295,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:54:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708295,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:54:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708295,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:54:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708295,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:54:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708295', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:54:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708295', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:54:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:54:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:54:27] Production.INFO: ==31313== Releasing lock...  
[2025-03-18 12:54:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:54:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:55:05
    [end_date_ymd] => 2025-03-18 12:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 09:55:05' and `end` < '2025-03-18 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-18 12:55:19] Production.INFO: count ==5021  
[2025-03-18 12:55:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:55:05 - End Time 2025-03-18 12:55:05  
[2025-03-18 12:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708300', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708300', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708300', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708300', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:55:21] Production.INFO: ProcessCDR(1,14708300,1,1,2)  
[2025-03-18 12:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708300,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:55:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708300,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:55:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708300,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:55:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708300,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:55:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708300', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:55:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708300', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:55:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:55:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:55:27] Production.INFO: ==31390== Releasing lock...  
[2025-03-18 12:55:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:55:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:56:06
    [end_date_ymd] => 2025-03-18 12:56:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:56:06' and `end` < '2025-03-18 12: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-18 12:56:20] Production.INFO: count ==5018  
[2025-03-18 12:56:22] Production.ERROR: pbx CDR StartTime 2025-03-18 09:56:06 - End Time 2025-03-18 12:56:06  
[2025-03-18 12:56:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708305', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708305', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708305', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708305', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:56:22] Production.INFO: ProcessCDR(1,14708305,1,1,2)  
[2025-03-18 12:56:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708305,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:56:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708305,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:56:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708305,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:56:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708305,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:56:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708305', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:56:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708305', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:56:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:56:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:56:28] Production.INFO: ==31467== Releasing lock...  
[2025-03-18 12:56:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:56:28] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 12:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:57:06
    [end_date_ymd] => 2025-03-18 12:57:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:57:06' and `end` < '2025-03-18 12: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-18 12:57:19] Production.INFO: count ==4990  
[2025-03-18 12:57:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:57:06 - End Time 2025-03-18 12:57:06  
[2025-03-18 12:57:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708310', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708310', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708310', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:57:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708310', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:57:22] Production.INFO: ProcessCDR(1,14708310,1,1,2)  
[2025-03-18 12:57:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708310,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:57:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708310,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:57:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708310,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:57:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708310,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708310', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708310', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:57:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:57:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:57:27] Production.INFO: ==31543== Releasing lock...  
[2025-03-18 12:57:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:57:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 12:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:58:06
    [end_date_ymd] => 2025-03-18 12:58:06
    [RateCDR] => 1
)
  
[2025-03-18 12: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-18 09:58:06' and `end` < '2025-03-18 12: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-18 12:58:19] Production.INFO: count ==4990  
[2025-03-18 12:58:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:58:06 - End Time 2025-03-18 12:58:06  
[2025-03-18 12:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708315', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708315', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708315', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708315', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:58:21] Production.INFO: ProcessCDR(1,14708315,1,1,2)  
[2025-03-18 12:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708315,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:58:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708315,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:58:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708315,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:58:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708315,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:58:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708315', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:58:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708315', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:58:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:58:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:58:27] Production.INFO: ==31623== Releasing lock...  
[2025-03-18 12:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:58:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 12:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 09:59:05
    [end_date_ymd] => 2025-03-18 12:59:05
    [RateCDR] => 1
)
  
[2025-03-18 12:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 09:59:05' and `end` < '2025-03-18 12:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 12:59:19] Production.INFO: count ==4980  
[2025-03-18 12:59:21] Production.ERROR: pbx CDR StartTime 2025-03-18 09:59:05 - End Time 2025-03-18 12:59:05  
[2025-03-18 12:59:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 12:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708320', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708320', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708320', 'tblTempVendorCDR_20' ) start  
[2025-03-18 12:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708320', 'tblTempVendorCDR_20' ) end  
[2025-03-18 12:59:21] Production.INFO: ProcessCDR(1,14708320,1,1,2)  
[2025-03-18 12:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:59:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 12:59:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:59:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 12:59:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708320', 'tblTempUsageDetail_20' ) start  
[2025-03-18 12:59:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708320', 'tblTempUsageDetail_20' ) end  
[2025-03-18 12:59:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 12:59:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 12:59:28] Production.INFO: ==31701== Releasing lock...  
[2025-03-18 12:59:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 12:59:28] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:00:07
    [end_date_ymd] => 2025-03-18 13:00:07
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:00:07' and `end` < '2025-03-18 13: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-18 13:00:20] Production.INFO: count ==4982  
[2025-03-18 13:00:23] Production.ERROR: pbx CDR StartTime 2025-03-18 10:00:07 - End Time 2025-03-18 13:00:07  
[2025-03-18 13:00:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708326', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708326', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708326', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708326', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:00:23] Production.INFO: ProcessCDR(1,14708326,1,1,2)  
[2025-03-18 13:00:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708326,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:00:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708326,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:00:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708326,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:00:29] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708326,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:00:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708326', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:00:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708326', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:00:29] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:00:29] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:00:29] Production.INFO: ==31784== Releasing lock...  
[2025-03-18 13:00:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:00:29] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:01:05
    [end_date_ymd] => 2025-03-18 13:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:01:05' and `end` < '2025-03-18 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-18 13:01:19] Production.INFO: count ==5033  
[2025-03-18 13:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:01:05 - End Time 2025-03-18 13:01:05  
[2025-03-18 13:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708331', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708331', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708331', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708331', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:01:21] Production.INFO: ProcessCDR(1,14708331,1,1,2)  
[2025-03-18 13:01:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708331,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:01:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708331,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:01:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708331,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:01:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708331,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708331', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708331', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:01:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:01:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:01:27] Production.INFO: ==31869== Releasing lock...  
[2025-03-18 13:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:01:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:02:06
    [end_date_ymd] => 2025-03-18 13:02:06
    [RateCDR] => 1
)
  
[2025-03-18 13:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:02:06' and `end` < '2025-03-18 13:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:02:20] Production.INFO: count ==5071  
[2025-03-18 13:02:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:02:06 - End Time 2025-03-18 13:02:06  
[2025-03-18 13:02:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708336', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708336', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708336', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:02:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708336', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:02:22] Production.INFO: ProcessCDR(1,14708336,1,1,2)  
[2025-03-18 13:02:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708336,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:02:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708336,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:02:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708336,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:02:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708336,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:02:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708336', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:02:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708336', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:02:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:02:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:02:28] Production.INFO: ==31946== Releasing lock...  
[2025-03-18 13:02:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:02:28] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:03:06
    [end_date_ymd] => 2025-03-18 13:03:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:03:06' and `end` < '2025-03-18 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-18 13:03:19] Production.INFO: count ==5075  
[2025-03-18 13:03:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:03:06 - End Time 2025-03-18 13:03:06  
[2025-03-18 13:03:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708341', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708341', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708341', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:03:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708341', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:03:22] Production.INFO: ProcessCDR(1,14708341,1,1,2)  
[2025-03-18 13:03:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708341,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:03:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708341,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:03:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708341,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:03:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708341,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:03:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708341', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:03:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708341', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:03:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:03:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:03:27] Production.INFO: ==32021== Releasing lock...  
[2025-03-18 13:03:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:03:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:04:06
    [end_date_ymd] => 2025-03-18 13:04:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:04:06' and `end` < '2025-03-18 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-18 13:04:20] Production.INFO: count ==5137  
[2025-03-18 13:04:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:04:06 - End Time 2025-03-18 13:04:06  
[2025-03-18 13:04:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708346', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708346', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708346', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708346', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:04:22] Production.INFO: ProcessCDR(1,14708346,1,1,2)  
[2025-03-18 13:04:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708346,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:04:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708346,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:04:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708346,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:04:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708346,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:04:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708346', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:04:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708346', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:04:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:04:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:04:28] Production.INFO: ==32104== Releasing lock...  
[2025-03-18 13:04:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:04:28] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:05:06
    [end_date_ymd] => 2025-03-18 13:05:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:05:06' and `end` < '2025-03-18 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-18 13:05:19] Production.INFO: count ==5144  
[2025-03-18 13:05:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:05:06 - End Time 2025-03-18 13:05:06  
[2025-03-18 13:05:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708351', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708351', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:05:21] Production.INFO: ProcessCDR(1,14708351,1,1,2)  
[2025-03-18 13:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:05:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:05:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:05:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:05:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:05:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:05:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:05:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:05:28] Production.INFO: ==32185== Releasing lock...  
[2025-03-18 13:05:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:05:28] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:06:06
    [end_date_ymd] => 2025-03-18 13:06:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:06:06' and `end` < '2025-03-18 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-18 13:06:19] Production.INFO: count ==5160  
[2025-03-18 13:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:06:06 - End Time 2025-03-18 13:06:06  
[2025-03-18 13:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708356', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708356', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708356', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708356', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:06:22] Production.INFO: ProcessCDR(1,14708356,1,1,2)  
[2025-03-18 13:06:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:06:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708356', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708356', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:06:27] Production.INFO: ==32262== Releasing lock...  
[2025-03-18 13:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:06:27] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 13:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:07:06
    [end_date_ymd] => 2025-03-18 13:07:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:07:06' and `end` < '2025-03-18 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-18 13:07:19] Production.INFO: count ==5134  
[2025-03-18 13:07:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:07:06 - End Time 2025-03-18 13:07:06  
[2025-03-18 13:07:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708361', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708361', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708361', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708361', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:07:22] Production.INFO: ProcessCDR(1,14708361,1,1,2)  
[2025-03-18 13:07:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:07:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:07:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:07:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708361', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708361', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:07:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:07:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:07:27] Production.INFO: ==32343== Releasing lock...  
[2025-03-18 13:07:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:07:27] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:08:06
    [end_date_ymd] => 2025-03-18 13:08:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:08:06' and `end` < '2025-03-18 13: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-18 13:08:19] Production.INFO: count ==5145  
[2025-03-18 13:08:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:08:06 - End Time 2025-03-18 13:08:06  
[2025-03-18 13:08:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708366', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708366', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:08:22] Production.INFO: ProcessCDR(1,14708366,1,1,2)  
[2025-03-18 13:08:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:08:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:08:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:08:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:08:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:08:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:08:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:08:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:08:27] Production.INFO: ==32459== Releasing lock...  
[2025-03-18 13:08:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:08:27] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:09:06
    [end_date_ymd] => 2025-03-18 13:09:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:09:06' and `end` < '2025-03-18 13: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-18 13:09:19] Production.INFO: count ==5171  
[2025-03-18 13:09:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:09:06 - End Time 2025-03-18 13:09:06  
[2025-03-18 13:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:09:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:09:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708371', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:09:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708371', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:09:22] Production.INFO: ProcessCDR(1,14708371,1,1,2)  
[2025-03-18 13:09:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:09:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:09:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:09:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:09:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:09:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:09:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:09:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:09:28] Production.INFO: ==32538== Releasing lock...  
[2025-03-18 13:09:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:09:28] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 13:10:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:10:06
    [end_date_ymd] => 2025-03-18 13:10:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:10:06' and `end` < '2025-03-18 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-18 13:10:20] Production.INFO: count ==5170  
[2025-03-18 13:10:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:10:06 - End Time 2025-03-18 13:10:06  
[2025-03-18 13:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708377', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708377', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708377', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708377', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:10:22] Production.INFO: ProcessCDR(1,14708377,1,1,2)  
[2025-03-18 13:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708377,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708377,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708377,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:10:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708377,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708377', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708377', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:10:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:10:28] Production.INFO: ==32619== Releasing lock...  
[2025-03-18 13:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:10:28] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 13:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:11:05
    [end_date_ymd] => 2025-03-18 13:11:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:11:05' and `end` < '2025-03-18 13: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-18 13:11:18] Production.INFO: count ==5157  
[2025-03-18 13:11:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:11:05 - End Time 2025-03-18 13:11:05  
[2025-03-18 13:11:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708382', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708382', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708382', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708382', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:11:21] Production.INFO: ProcessCDR(1,14708382,1,1,2)  
[2025-03-18 13:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708382,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:11:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708382,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:11:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708382,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:11:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708382,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708382', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708382', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:11:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:11:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:11:26] Production.INFO: ==32696== Releasing lock...  
[2025-03-18 13:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:11:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:12:06
    [end_date_ymd] => 2025-03-18 13:12:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:12:06' and `end` < '2025-03-18 13: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-18 13:12:20] Production.INFO: count ==5148  
[2025-03-18 13:12:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:12:06 - End Time 2025-03-18 13:12:06  
[2025-03-18 13:12:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:12:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708387', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:12:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708387', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:12:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708387', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:12:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708387', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:12:22] Production.INFO: ProcessCDR(1,14708387,1,1,2)  
[2025-03-18 13:12:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708387,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:12:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708387,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:12:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708387,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:12:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708387,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:12:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708387', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:12:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708387', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:12:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:12:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:12:28] Production.INFO: ==315== Releasing lock...  
[2025-03-18 13:12:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:12:28] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:13:05
    [end_date_ymd] => 2025-03-18 13:13:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:13:05' and `end` < '2025-03-18 13: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-18 13:13:18] Production.INFO: count ==5155  
[2025-03-18 13:13:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:13:05 - End Time 2025-03-18 13:13:05  
[2025-03-18 13:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708392', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708392', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708392', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708392', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:13:20] Production.INFO: ProcessCDR(1,14708392,1,1,2)  
[2025-03-18 13:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708392,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708392,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708392,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:13:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708392,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708392', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708392', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:13:26] Production.INFO: ==408== Releasing lock...  
[2025-03-18 13:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:13:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 13:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:14:06
    [end_date_ymd] => 2025-03-18 13:14:06
    [RateCDR] => 1
)
  
[2025-03-18 13:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:14:06' and `end` < '2025-03-18 13:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:14:19] Production.INFO: count ==5091  
[2025-03-18 13:14:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:14:06 - End Time 2025-03-18 13:14:06  
[2025-03-18 13:14:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:14:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:14:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:14:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708397', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:14:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708397', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:14:22] Production.INFO: ProcessCDR(1,14708397,1,1,2)  
[2025-03-18 13:14:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:14:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:14:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:14:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:14:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:14:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:14:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:14:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:14:27] Production.INFO: ==488== Releasing lock...  
[2025-03-18 13:14:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:14:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:15:05
    [end_date_ymd] => 2025-03-18 13:15:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:15:05' and `end` < '2025-03-18 13: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-18 13:15:19] Production.INFO: count ==5034  
[2025-03-18 13:15:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:15:05 - End Time 2025-03-18 13:15:05  
[2025-03-18 13:15:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708402', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708402', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:15:21] Production.INFO: ProcessCDR(1,14708402,1,1,2)  
[2025-03-18 13:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:15:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:15:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:15:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:15:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:15:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:15:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:15:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:15:27] Production.INFO: ==568== Releasing lock...  
[2025-03-18 13:15:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:15:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:16:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:16:04
    [end_date_ymd] => 2025-03-18 13:16:04
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:16:04' and `end` < '2025-03-18 13: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-18 13:16:18] Production.INFO: count ==5048  
[2025-03-18 13:16:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:16:04 - End Time 2025-03-18 13:16:04  
[2025-03-18 13:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708407', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708407', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708407', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708407', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:16:20] Production.INFO: ProcessCDR(1,14708407,1,1,2)  
[2025-03-18 13:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708407', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708407', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:16:26] Production.INFO: ==653== Releasing lock...  
[2025-03-18 13:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:16:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:17:05
    [end_date_ymd] => 2025-03-18 13:17:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:17:05' and `end` < '2025-03-18 13: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-18 13:17:19] Production.INFO: count ==5062  
[2025-03-18 13:17:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:17:05 - End Time 2025-03-18 13:17:05  
[2025-03-18 13:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708412', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708412', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708412', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708412', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:17:21] Production.INFO: ProcessCDR(1,14708412,1,1,2)  
[2025-03-18 13:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:17:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:17:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:17:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:17:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708412', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:17:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708412', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:17:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:17:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:17:27] Production.INFO: ==760== Releasing lock...  
[2025-03-18 13:17:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:17:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:18:05
    [end_date_ymd] => 2025-03-18 13:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:18:05' and `end` < '2025-03-18 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-18 13:18:18] Production.INFO: count ==5087  
[2025-03-18 13:18:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:18:05 - End Time 2025-03-18 13:18:05  
[2025-03-18 13:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708417', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708417', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:18:21] Production.INFO: ProcessCDR(1,14708417,1,1,2)  
[2025-03-18 13:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:18:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:18:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:18:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:18:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:18:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:18:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:18:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:18:27] Production.INFO: ==850== Releasing lock...  
[2025-03-18 13:18:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:18:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:19:06
    [end_date_ymd] => 2025-03-18 13:19:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:19:06' and `end` < '2025-03-18 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-18 13:19:19] Production.INFO: count ==5114  
[2025-03-18 13:19:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:19:06 - End Time 2025-03-18 13:19:06  
[2025-03-18 13:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708422', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708422', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:19:21] Production.INFO: ProcessCDR(1,14708422,1,1,2)  
[2025-03-18 13:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:19:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:19:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:19:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:19:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:19:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:19:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:19:27] Production.INFO: ==924== Releasing lock...  
[2025-03-18 13:19:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:19:27] Production.INFO: 66.25 MB  #Memory Used#   
[2025-03-18 13:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:20:06
    [end_date_ymd] => 2025-03-18 13:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:20:06' and `end` < '2025-03-18 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-18 13:20:19] Production.INFO: count ==5106  
[2025-03-18 13:20:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:20:06 - End Time 2025-03-18 13:20:06  
[2025-03-18 13:20:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708428', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708428', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708428', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708428', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:20:22] Production.INFO: ProcessCDR(1,14708428,1,1,2)  
[2025-03-18 13:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708428,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:20:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708428,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:20:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708428,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:20:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708428,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708428', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:20:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708428', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:20:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:20:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:20:28] Production.INFO: ==1008== Releasing lock...  
[2025-03-18 13:20:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:20:28] Production.INFO: 66.25 MB  #Memory Used#   
[2025-03-18 13:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:21:05
    [end_date_ymd] => 2025-03-18 13:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:21:05' and `end` < '2025-03-18 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-18 13:21:19] Production.INFO: count ==5068  
[2025-03-18 13:21:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:21:05 - End Time 2025-03-18 13:21:05  
[2025-03-18 13:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708433', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708433', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708433', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708433', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:21:21] Production.INFO: ProcessCDR(1,14708433,1,1,2)  
[2025-03-18 13:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708433,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:21:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708433,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:21:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708433,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:21:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708433,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:21:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708433', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:21:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708433', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:21:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:21:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:21:27] Production.INFO: ==1090== Releasing lock...  
[2025-03-18 13:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:21:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:22:06
    [end_date_ymd] => 2025-03-18 13:22:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:22:06' and `end` < '2025-03-18 13: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-18 13:22:19] Production.INFO: count ==5070  
[2025-03-18 13:22:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:22:06 - End Time 2025-03-18 13:22:06  
[2025-03-18 13:22:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:22:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708438', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:22:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708438', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:22:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708438', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:22:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708438', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:22:22] Production.INFO: ProcessCDR(1,14708438,1,1,2)  
[2025-03-18 13:22:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708438,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:22:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708438,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:22:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708438,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:22:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708438,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:22:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708438', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:22:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708438', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:22:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:22:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:22:27] Production.INFO: ==1175== Releasing lock...  
[2025-03-18 13:22:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:22:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:23:06
    [end_date_ymd] => 2025-03-18 13:23:06
    [RateCDR] => 1
)
  
[2025-03-18 13:23:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:23:06' and `end` < '2025-03-18 13:23:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:23:19] Production.INFO: count ==5059  
[2025-03-18 13:23:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:23:06 - End Time 2025-03-18 13:23:06  
[2025-03-18 13:23:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708443', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708443', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708443', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708443', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:23:22] Production.INFO: ProcessCDR(1,14708443,1,1,2)  
[2025-03-18 13:23:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708443,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:23:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708443,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:23:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708443,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:23:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708443,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708443', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708443', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:23:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:23:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:23:27] Production.INFO: ==1302== Releasing lock...  
[2025-03-18 13:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:23:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:24:06
    [end_date_ymd] => 2025-03-18 13:24:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:24:06' and `end` < '2025-03-18 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-18 13:24:19] Production.INFO: count ==5065  
[2025-03-18 13:24:22] Production.ERROR: pbx CDR StartTime 2025-03-18 10:24:06 - End Time 2025-03-18 13:24:06  
[2025-03-18 13:24:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:24:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708448', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:24:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708448', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:24:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708448', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:24:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708448', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:24:22] Production.INFO: ProcessCDR(1,14708448,1,1,2)  
[2025-03-18 13:24:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708448,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:24:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708448,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:24:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708448,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:24:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708448,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:24:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708448', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:24:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708448', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:24:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:24:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:24:28] Production.INFO: ==1376== Releasing lock...  
[2025-03-18 13:24:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:24:28] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:25:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:25:07
    [end_date_ymd] => 2025-03-18 13:25:07
    [RateCDR] => 1
)
  
[2025-03-18 13:25: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-18 10:25:07' and `end` < '2025-03-18 13:25: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-18 13:25:20] Production.INFO: count ==5042  
[2025-03-18 13:25:23] Production.ERROR: pbx CDR StartTime 2025-03-18 10:25:07 - End Time 2025-03-18 13:25:07  
[2025-03-18 13:25:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:25:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:25:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:25:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708453', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:25:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708453', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:25:23] Production.INFO: ProcessCDR(1,14708453,1,1,2)  
[2025-03-18 13:25:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:25:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:25:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:25:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:25:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:25:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:25:29] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:25:29] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:25:29] Production.INFO: ==1455== Releasing lock...  
[2025-03-18 13:25:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:25:29] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:26:05
    [end_date_ymd] => 2025-03-18 13:26:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:26:05' and `end` < '2025-03-18 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-18 13:26:19] Production.INFO: count ==5012  
[2025-03-18 13:26:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:26:05 - End Time 2025-03-18 13:26:05  
[2025-03-18 13:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708458', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708458', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708458', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708458', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:26:21] Production.INFO: ProcessCDR(1,14708458,1,1,2)  
[2025-03-18 13:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:26:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:26:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:26:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:26:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708458', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:26:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708458', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:26:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:26:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:26:27] Production.INFO: ==1578== Releasing lock...  
[2025-03-18 13:26:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:26:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 13:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:27:05
    [end_date_ymd] => 2025-03-18 13:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:27:05' and `end` < '2025-03-18 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-18 13:27:18] Production.INFO: count ==4996  
[2025-03-18 13:27:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:27:05 - End Time 2025-03-18 13:27:05  
[2025-03-18 13:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708463', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708463', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708463', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708463', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:27:20] Production.INFO: ProcessCDR(1,14708463,1,1,2)  
[2025-03-18 13:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:27:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:27:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:27:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708463', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708463', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:27:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:27:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:27:24] Production.INFO: ==1649== Releasing lock...  
[2025-03-18 13:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:27:24] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 13:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:28:06
    [end_date_ymd] => 2025-03-18 13:28:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:28:06' and `end` < '2025-03-18 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-18 13:28:19] Production.INFO: count ==5022  
[2025-03-18 13:28:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:28:06 - End Time 2025-03-18 13:28:06  
[2025-03-18 13:28:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708468', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708468', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708468', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708468', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:28:21] Production.INFO: ProcessCDR(1,14708468,1,1,2)  
[2025-03-18 13:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:28:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:28:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:28:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708468', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708468', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:28:26] Production.INFO: ==1730== Releasing lock...  
[2025-03-18 13:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:28:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 13:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:29:05
    [end_date_ymd] => 2025-03-18 13:29:05
    [RateCDR] => 1
)
  
[2025-03-18 13:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:29:05' and `end` < '2025-03-18 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-18 13:29:19] Production.INFO: count ==4991  
[2025-03-18 13:29:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:29:05 - End Time 2025-03-18 13:29:05  
[2025-03-18 13:29:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708473', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708473', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:29:21] Production.INFO: ProcessCDR(1,14708473,1,1,2)  
[2025-03-18 13:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:29:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:29:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:29:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:29:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:29:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:29:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:29:27] Production.INFO: ==1810== Releasing lock...  
[2025-03-18 13:29:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:29:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:30:06
    [end_date_ymd] => 2025-03-18 13:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:30:06' and `end` < '2025-03-18 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-18 13:30:19] Production.INFO: count ==4980  
[2025-03-18 13:30:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:30:06 - End Time 2025-03-18 13:30:06  
[2025-03-18 13:30:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708479', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708479', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708479', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708479', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:30:21] Production.INFO: ProcessCDR(1,14708479,1,1,2)  
[2025-03-18 13:30:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708479,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:30:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708479,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:30:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708479,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:30:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708479,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708479', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708479', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:30:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:30:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:30:27] Production.INFO: ==1892== Releasing lock...  
[2025-03-18 13:30:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:30:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:31:06
    [end_date_ymd] => 2025-03-18 13:31:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:31:06' and `end` < '2025-03-18 13: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-18 13:31:19] Production.INFO: count ==4950  
[2025-03-18 13:31:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:31:06 - End Time 2025-03-18 13:31:06  
[2025-03-18 13:31:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708484', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708484', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708484', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708484', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:31:22] Production.INFO: ProcessCDR(1,14708484,1,1,2)  
[2025-03-18 13:31:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708484,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:31:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708484,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:31:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708484,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:31:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708484,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708484', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:31:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708484', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:31:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:31:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:31:27] Production.INFO: ==1971== Releasing lock...  
[2025-03-18 13:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:31:27] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:32:05
    [end_date_ymd] => 2025-03-18 13:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:32:05' and `end` < '2025-03-18 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-18 13:32:18] Production.INFO: count ==4910  
[2025-03-18 13:32:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:32:05 - End Time 2025-03-18 13:32:05  
[2025-03-18 13:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708489', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708489', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708489', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708489', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:32:21] Production.INFO: ProcessCDR(1,14708489,1,1,2)  
[2025-03-18 13:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708489,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708489,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708489,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708489,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708489', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708489', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:32:26] Production.INFO: ==2052== Releasing lock...  
[2025-03-18 13:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:32:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-03-18 13:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:33:05
    [end_date_ymd] => 2025-03-18 13:33:05
    [RateCDR] => 1
)
  
[2025-03-18 13:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:33:05' and `end` < '2025-03-18 13:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:33:18] Production.INFO: count ==4901  
[2025-03-18 13:33:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:33:05 - End Time 2025-03-18 13:33:05  
[2025-03-18 13:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708494', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708494', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708494', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708494', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:33:21] Production.INFO: ProcessCDR(1,14708494,1,1,2)  
[2025-03-18 13:33:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708494,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708494,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708494,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:33:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708494,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708494', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708494', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:33:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:33:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:33:26] Production.INFO: ==2130== Releasing lock...  
[2025-03-18 13:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:33:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-03-18 13:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:34:05
    [end_date_ymd] => 2025-03-18 13:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:34:05' and `end` < '2025-03-18 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-18 13:34:19] Production.INFO: count ==4916  
[2025-03-18 13:34:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:34:05 - End Time 2025-03-18 13:34:05  
[2025-03-18 13:34:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708499', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708499', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708499', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708499', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:34:21] Production.INFO: ProcessCDR(1,14708499,1,1,2)  
[2025-03-18 13:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708499,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708499,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708499,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708499,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708499', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708499', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:34:26] Production.INFO: ==2211== Releasing lock...  
[2025-03-18 13:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:34:26] Production.INFO: 64.75 MB  #Memory Used#   
[2025-03-18 13:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:35:05
    [end_date_ymd] => 2025-03-18 13:35:05
    [RateCDR] => 1
)
  
[2025-03-18 13:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:35:05' and `end` < '2025-03-18 13:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:35:18] Production.INFO: count ==4927  
[2025-03-18 13:35:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:35:05 - End Time 2025-03-18 13:35:05  
[2025-03-18 13:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708504', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708504', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:35:21] Production.INFO: ProcessCDR(1,14708504,1,1,2)  
[2025-03-18 13:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:35:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:35:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:35:26] Production.INFO: ==2289== Releasing lock...  
[2025-03-18 13:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:35:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:36:05
    [end_date_ymd] => 2025-03-18 13:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:36:05' and `end` < '2025-03-18 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-18 13:36:18] Production.INFO: count ==4948  
[2025-03-18 13:36:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:36:05 - End Time 2025-03-18 13:36:05  
[2025-03-18 13:36:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708509', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708509', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708509', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708509', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:36:21] Production.INFO: ProcessCDR(1,14708509,1,1,2)  
[2025-03-18 13:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708509', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708509', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:36:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:36:26] Production.INFO: ==2366== Releasing lock...  
[2025-03-18 13:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:36:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:37:06
    [end_date_ymd] => 2025-03-18 13:37:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:37:06' and `end` < '2025-03-18 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-18 13:37:19] Production.INFO: count ==4962  
[2025-03-18 13:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:37:06 - End Time 2025-03-18 13:37:06  
[2025-03-18 13:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708514', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708514', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708514', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708514', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:37:21] Production.INFO: ProcessCDR(1,14708514,1,1,2)  
[2025-03-18 13:37:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:37:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:37:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:37:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708514', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708514', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:37:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:37:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:37:26] Production.INFO: ==2442== Releasing lock...  
[2025-03-18 13:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:37:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:38:05
    [end_date_ymd] => 2025-03-18 13:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:38:05' and `end` < '2025-03-18 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-18 13:38:19] Production.INFO: count ==4967  
[2025-03-18 13:38:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:38:05 - End Time 2025-03-18 13:38:05  
[2025-03-18 13:38:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708519', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708519', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:38:21] Production.INFO: ProcessCDR(1,14708519,1,1,2)  
[2025-03-18 13:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:38:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:38:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:38:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:38:26] Production.INFO: ==2518== Releasing lock...  
[2025-03-18 13:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:38:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:39:06
    [end_date_ymd] => 2025-03-18 13:39:06
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:39:06' and `end` < '2025-03-18 13: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-18 13:39:19] Production.INFO: count ==4949  
[2025-03-18 13:39:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:39:06 - End Time 2025-03-18 13:39:06  
[2025-03-18 13:39:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708524', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708524', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:39:21] Production.INFO: ProcessCDR(1,14708524,1,1,2)  
[2025-03-18 13:39:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:39:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:39:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:39:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:39:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:39:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:39:26] Production.INFO: ==2638== Releasing lock...  
[2025-03-18 13:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:39:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:40:06
    [end_date_ymd] => 2025-03-18 13:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:40:06' and `end` < '2025-03-18 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-18 13:40:19] Production.INFO: count ==4949  
[2025-03-18 13:40:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:40:06 - End Time 2025-03-18 13:40:06  
[2025-03-18 13:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708530', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708530', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708530', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:40:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708530', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:40:22] Production.INFO: ProcessCDR(1,14708530,1,1,2)  
[2025-03-18 13:40:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708530,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:40:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708530,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:40:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708530', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:40:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708530', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:40:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:40:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:40:27] Production.INFO: ==2715== Releasing lock...  
[2025-03-18 13:40:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:40:27] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:41:05
    [end_date_ymd] => 2025-03-18 13:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:41:05' and `end` < '2025-03-18 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-18 13:41:18] Production.INFO: count ==4960  
[2025-03-18 13:41:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:41:05 - End Time 2025-03-18 13:41:05  
[2025-03-18 13:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708535', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708535', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708535', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708535', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:41:21] Production.INFO: ProcessCDR(1,14708535,1,1,2)  
[2025-03-18 13:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708535,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708535,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708535,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708535,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708535', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708535', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:41:26] Production.INFO: ==2793== Releasing lock...  
[2025-03-18 13:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:41:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:42:05
    [end_date_ymd] => 2025-03-18 13:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:42:05' and `end` < '2025-03-18 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-18 13:42:18] Production.INFO: count ==4947  
[2025-03-18 13:42:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:42:05 - End Time 2025-03-18 13:42:05  
[2025-03-18 13:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708540', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708540', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708540', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708540', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:42:20] Production.INFO: ProcessCDR(1,14708540,1,1,2)  
[2025-03-18 13:42:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708540,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708540,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708540,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:42:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708540,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708540', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708540', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:42:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:42:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:42:25] Production.INFO: ==2868== Releasing lock...  
[2025-03-18 13:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:42:25] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:43:05
    [end_date_ymd] => 2025-03-18 13:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:43:05' and `end` < '2025-03-18 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-18 13:43:18] Production.INFO: count ==4946  
[2025-03-18 13:43:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:43:05 - End Time 2025-03-18 13:43:05  
[2025-03-18 13:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708545', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708545', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708545', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708545', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:43:20] Production.INFO: ProcessCDR(1,14708545,1,1,2)  
[2025-03-18 13:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708545,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708545,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708545,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708545,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708545', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708545', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:43:25] Production.INFO: ==2941== Releasing lock...  
[2025-03-18 13:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:43:25] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 13:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:44:05
    [end_date_ymd] => 2025-03-18 13:44:05
    [RateCDR] => 1
)
  
[2025-03-18 13:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:44:05' and `end` < '2025-03-18 13:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:44:18] Production.INFO: count ==4970  
[2025-03-18 13:44:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:44:05 - End Time 2025-03-18 13:44:05  
[2025-03-18 13:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708550', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708550', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:44:20] Production.INFO: ProcessCDR(1,14708550,1,1,2)  
[2025-03-18 13:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:44:26] Production.INFO: ==3013== Releasing lock...  
[2025-03-18 13:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:44:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:45:05
    [end_date_ymd] => 2025-03-18 13:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:45:05' and `end` < '2025-03-18 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-18 13:45:18] Production.INFO: count ==4971  
[2025-03-18 13:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:45:05 - End Time 2025-03-18 13:45:05  
[2025-03-18 13:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708555', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708555', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:45:21] Production.INFO: ProcessCDR(1,14708555,1,1,2)  
[2025-03-18 13:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:45:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:45:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:45:26] Production.INFO: ==3091== Releasing lock...  
[2025-03-18 13:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:45:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 13:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:46:05
    [end_date_ymd] => 2025-03-18 13:46:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:46:05' and `end` < '2025-03-18 13: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-18 13:46:18] Production.INFO: count ==4997  
[2025-03-18 13:46:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:46:05 - End Time 2025-03-18 13:46:05  
[2025-03-18 13:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708560', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708560', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:46:20] Production.INFO: ProcessCDR(1,14708560,1,1,2)  
[2025-03-18 13:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:46:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:46:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:46:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:46:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:46:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:46:25] Production.INFO: ==3165== Releasing lock...  
[2025-03-18 13:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:46:25] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 13:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:47:05
    [end_date_ymd] => 2025-03-18 13:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:47:05' and `end` < '2025-03-18 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-18 13:47:19] Production.INFO: count ==5007  
[2025-03-18 13:47:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:47:05 - End Time 2025-03-18 13:47:05  
[2025-03-18 13:47:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708565', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708565', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708565', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708565', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:47:21] Production.INFO: ProcessCDR(1,14708565,1,1,2)  
[2025-03-18 13:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:47:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708565', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708565', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:47:26] Production.INFO: ==3238== Releasing lock...  
[2025-03-18 13:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:47:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 13:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:48:05
    [end_date_ymd] => 2025-03-18 13:48:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:48:05' and `end` < '2025-03-18 13: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-18 13:48:19] Production.INFO: count ==5009  
[2025-03-18 13:48:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:48:05 - End Time 2025-03-18 13:48:05  
[2025-03-18 13:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708570', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708570', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708570', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708570', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:48:21] Production.INFO: ProcessCDR(1,14708570,1,1,2)  
[2025-03-18 13:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708570', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708570', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:48:26] Production.INFO: ==3310== Releasing lock...  
[2025-03-18 13:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:48:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 13:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:49:05
    [end_date_ymd] => 2025-03-18 13:49:05
    [RateCDR] => 1
)
  
[2025-03-18 13:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:49:05' and `end` < '2025-03-18 13:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:49:18] Production.INFO: count ==5032  
[2025-03-18 13:49:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:49:05 - End Time 2025-03-18 13:49:05  
[2025-03-18 13:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708575', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708575', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708575', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708575', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:49:21] Production.INFO: ProcessCDR(1,14708575,1,1,2)  
[2025-03-18 13:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708575', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708575', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:49:26] Production.INFO: ==3385== Releasing lock...  
[2025-03-18 13:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:49:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:50:06
    [end_date_ymd] => 2025-03-18 13:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:50:06' and `end` < '2025-03-18 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-18 13:50:19] Production.INFO: count ==5037  
[2025-03-18 13:50:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:50:06 - End Time 2025-03-18 13:50:06  
[2025-03-18 13:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708580', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708580', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708580', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708580', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:50:21] Production.INFO: ProcessCDR(1,14708580,1,1,2)  
[2025-03-18 13:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:50:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:50:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708580', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708580', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:50:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:50:27] Production.INFO: ==3458== Releasing lock...  
[2025-03-18 13:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:50:27] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:51:05
    [end_date_ymd] => 2025-03-18 13:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:51:05' and `end` < '2025-03-18 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-18 13:51:18] Production.INFO: count ==5067  
[2025-03-18 13:51:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:51:05 - End Time 2025-03-18 13:51:05  
[2025-03-18 13:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708586', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708586', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:51:20] Production.INFO: ProcessCDR(1,14708586,1,1,2)  
[2025-03-18 13:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708586,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:51:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708586,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:51:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708586', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708586', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:51:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:51:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:51:26] Production.INFO: ==3537== Releasing lock...  
[2025-03-18 13:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:51:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 13:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:52:05
    [end_date_ymd] => 2025-03-18 13:52:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:52:05' and `end` < '2025-03-18 13: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-18 13:52:19] Production.INFO: count ==5047  
[2025-03-18 13:52:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:52:05 - End Time 2025-03-18 13:52:05  
[2025-03-18 13:52:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708591', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708591', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:52:21] Production.INFO: ProcessCDR(1,14708591,1,1,2)  
[2025-03-18 13:52:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:52:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708591,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:52:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:52:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708591,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:52:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708591', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:52:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708591', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:52:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:52:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:52:26] Production.INFO: ==3608== Releasing lock...  
[2025-03-18 13:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:52:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:53:05
    [end_date_ymd] => 2025-03-18 13:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:53:05' and `end` < '2025-03-18 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-18 13:53:18] Production.INFO: count ==5048  
[2025-03-18 13:53:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:53:05 - End Time 2025-03-18 13:53:05  
[2025-03-18 13:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708596', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708596', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708596', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708596', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:53:21] Production.INFO: ProcessCDR(1,14708596,1,1,2)  
[2025-03-18 13:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708596,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708596,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708596,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708596,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708596', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708596', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:53:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:53:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:53:25] Production.INFO: ==3684== Releasing lock...  
[2025-03-18 13:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:53:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:54:05
    [end_date_ymd] => 2025-03-18 13:54:05
    [RateCDR] => 1
)
  
[2025-03-18 13:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 10:54:05' and `end` < '2025-03-18 13:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 13:54:19] Production.INFO: count ==5043  
[2025-03-18 13:54:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:54:05 - End Time 2025-03-18 13:54:05  
[2025-03-18 13:54:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708601', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708601', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:54:21] Production.INFO: ProcessCDR(1,14708601,1,1,2)  
[2025-03-18 13:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:54:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:54:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:54:26] Production.INFO: ==3796== Releasing lock...  
[2025-03-18 13:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:54:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:55:05
    [end_date_ymd] => 2025-03-18 13:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:55:05' and `end` < '2025-03-18 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-18 13:55:18] Production.INFO: count ==5053  
[2025-03-18 13:55:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:55:05 - End Time 2025-03-18 13:55:05  
[2025-03-18 13:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708606', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708606', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:55:20] Production.INFO: ProcessCDR(1,14708606,1,1,2)  
[2025-03-18 13:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:55:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:55:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:55:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:55:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:55:24] Production.INFO: ==3868== Releasing lock...  
[2025-03-18 13:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:55:24] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:56:05
    [end_date_ymd] => 2025-03-18 13:56:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:56:05' and `end` < '2025-03-18 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-18 13:56:19] Production.INFO: count ==5046  
[2025-03-18 13:56:21] Production.ERROR: pbx CDR StartTime 2025-03-18 10:56:05 - End Time 2025-03-18 13:56:05  
[2025-03-18 13:56:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708611', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708611', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:56:21] Production.INFO: ProcessCDR(1,14708611,1,1,2)  
[2025-03-18 13:56:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:56:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:56:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:56:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:56:24] Production.INFO: ==3943== Releasing lock...  
[2025-03-18 13:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:56:24] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:57:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:57:04
    [end_date_ymd] => 2025-03-18 13:57:04
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:57:04' and `end` < '2025-03-18 13: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-18 13:57:18] Production.INFO: count ==5056  
[2025-03-18 13:57:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:57:04 - End Time 2025-03-18 13:57:04  
[2025-03-18 13:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708616', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708616', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:57:20] Production.INFO: ProcessCDR(1,14708616,1,1,2)  
[2025-03-18 13:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:57:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:57:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:57:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:57:25] Production.INFO: ==4015== Releasing lock...  
[2025-03-18 13:57:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:57:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:58:05
    [end_date_ymd] => 2025-03-18 13:58:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 10:58:05' and `end` < '2025-03-18 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-18 13:58:18] Production.INFO: count ==5055  
[2025-03-18 13:58:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:58:05 - End Time 2025-03-18 13:58:05  
[2025-03-18 13:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708621', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708621', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708621', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708621', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:58:21] Production.INFO: ProcessCDR(1,14708621,1,1,2)  
[2025-03-18 13:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:58:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:58:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:58:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:58:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708621', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708621', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:58:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:58:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:58:26] Production.INFO: ==4089== Releasing lock...  
[2025-03-18 13:58:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:58:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 13:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 10:59:05
    [end_date_ymd] => 2025-03-18 13:59:05
    [RateCDR] => 1
)
  
[2025-03-18 13: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-18 10:59:05' and `end` < '2025-03-18 13: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-18 13:59:18] Production.INFO: count ==5052  
[2025-03-18 13:59:20] Production.ERROR: pbx CDR StartTime 2025-03-18 10:59:05 - End Time 2025-03-18 13:59:05  
[2025-03-18 13:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 13:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708626', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708626', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708626', 'tblTempVendorCDR_20' ) start  
[2025-03-18 13:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708626', 'tblTempVendorCDR_20' ) end  
[2025-03-18 13:59:20] Production.INFO: ProcessCDR(1,14708626,1,1,2)  
[2025-03-18 13:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 13:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 13:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708626', 'tblTempUsageDetail_20' ) start  
[2025-03-18 13:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708626', 'tblTempUsageDetail_20' ) end  
[2025-03-18 13:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 13:59:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 13:59:25] Production.INFO: ==4163== Releasing lock...  
[2025-03-18 13:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 13:59:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 14:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:00:06
    [end_date_ymd] => 2025-03-18 14:00:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:00:06' and `end` < '2025-03-18 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-18 14:00:20] Production.INFO: count ==5034  
[2025-03-18 14:00:22] Production.ERROR: pbx CDR StartTime 2025-03-18 11:00:06 - End Time 2025-03-18 14:00:06  
[2025-03-18 14:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708631', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708631', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708631', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708631', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:00:22] Production.INFO: ProcessCDR(1,14708631,1,1,2)  
[2025-03-18 14:00:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:00:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:00:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:00:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708631', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708631', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:00:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:00:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:00:28] Production.INFO: ==4239== Releasing lock...  
[2025-03-18 14:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:00:28] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 14:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:01:05
    [end_date_ymd] => 2025-03-18 14:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:01:05' and `end` < '2025-03-18 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-18 14:01:19] Production.INFO: count ==4998  
[2025-03-18 14:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:01:05 - End Time 2025-03-18 14:01:05  
[2025-03-18 14:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708637', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708637', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:01:21] Production.INFO: ProcessCDR(1,14708637,1,1,2)  
[2025-03-18 14:01:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708637,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:01:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708637,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708637', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708637', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:01:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:01:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:01:26] Production.INFO: ==4327== Releasing lock...  
[2025-03-18 14:01:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:01:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:02:06
    [end_date_ymd] => 2025-03-18 14:02:06
    [RateCDR] => 1
)
  
[2025-03-18 14:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:02:06' and `end` < '2025-03-18 14:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:02:19] Production.INFO: count ==4977  
[2025-03-18 14:02:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:02:06 - End Time 2025-03-18 14:02:06  
[2025-03-18 14:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708642', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708642', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708642', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708642', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:02:21] Production.INFO: ProcessCDR(1,14708642,1,1,2)  
[2025-03-18 14:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708642,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708642,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708642,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:02:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708642,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:02:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708642', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:02:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708642', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:02:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:02:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:02:27] Production.INFO: ==4404== Releasing lock...  
[2025-03-18 14:02:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:02:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 14:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:03:05
    [end_date_ymd] => 2025-03-18 14:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:03:05' and `end` < '2025-03-18 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-18 14:03:18] Production.INFO: count ==4977  
[2025-03-18 14:03:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:03:05 - End Time 2025-03-18 14:03:05  
[2025-03-18 14:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708647', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708647', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708647', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708647', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:03:21] Production.INFO: ProcessCDR(1,14708647,1,1,2)  
[2025-03-18 14:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708647,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708647,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708647,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708647,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708647', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708647', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:03:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:03:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:03:26] Production.INFO: ==4477== Releasing lock...  
[2025-03-18 14:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:03:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 14:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:04:05
    [end_date_ymd] => 2025-03-18 14:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:04:05' and `end` < '2025-03-18 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-18 14:04:19] Production.INFO: count ==4981  
[2025-03-18 14:04:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:04:05 - End Time 2025-03-18 14:04:05  
[2025-03-18 14:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708652', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708652', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:04:21] Production.INFO: ProcessCDR(1,14708652,1,1,2)  
[2025-03-18 14:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:04:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:04:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:04:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:04:27] Production.INFO: ==4551== Releasing lock...  
[2025-03-18 14:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:04:27] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 14:05:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:05:04
    [end_date_ymd] => 2025-03-18 14:05:04
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:05:04' and `end` < '2025-03-18 14: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-18 14:05:18] Production.INFO: count ==4975  
[2025-03-18 14:05:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:05:04 - End Time 2025-03-18 14:05:04  
[2025-03-18 14:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708657', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708657', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:05:20] Production.INFO: ProcessCDR(1,14708657,1,1,2)  
[2025-03-18 14:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:05:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:05:25] Production.INFO: ==4629== Releasing lock...  
[2025-03-18 14:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:05:25] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 14:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:06:05
    [end_date_ymd] => 2025-03-18 14:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:06:05' and `end` < '2025-03-18 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-18 14:06:19] Production.INFO: count ==4996  
[2025-03-18 14:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:06:05 - End Time 2025-03-18 14:06:05  
[2025-03-18 14:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708662', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708662', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:06:21] Production.INFO: ProcessCDR(1,14708662,1,1,2)  
[2025-03-18 14:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:06:26] Production.INFO: ==4701== Releasing lock...  
[2025-03-18 14:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:06:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:07:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:07:04
    [end_date_ymd] => 2025-03-18 14:07:04
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:07:04' and `end` < '2025-03-18 14: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-18 14:07:18] Production.INFO: count ==5000  
[2025-03-18 14:07:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:07:04 - End Time 2025-03-18 14:07:04  
[2025-03-18 14:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708667', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708667', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:07:20] Production.INFO: ProcessCDR(1,14708667,1,1,2)  
[2025-03-18 14:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:07:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:07:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:07:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:07:25] Production.INFO: ==4775== Releasing lock...  
[2025-03-18 14:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:07:25] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:08:05
    [end_date_ymd] => 2025-03-18 14:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:08:05' and `end` < '2025-03-18 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-18 14:08:18] Production.INFO: count ==5009  
[2025-03-18 14:08:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:08:05 - End Time 2025-03-18 14:08:05  
[2025-03-18 14:08:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708672', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708672', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708672', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708672', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:08:21] Production.INFO: ProcessCDR(1,14708672,1,1,2)  
[2025-03-18 14:08:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:08:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:08:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:08:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708672', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:08:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708672', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:08:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:08:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:08:27] Production.INFO: ==4849== Releasing lock...  
[2025-03-18 14:08:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:08:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:09:05
    [end_date_ymd] => 2025-03-18 14:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:09:05' and `end` < '2025-03-18 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-18 14:09:18] Production.INFO: count ==5010  
[2025-03-18 14:09:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:09:05 - End Time 2025-03-18 14:09:05  
[2025-03-18 14:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708677', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708677', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708677', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708677', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:09:21] Production.INFO: ProcessCDR(1,14708677,1,1,2)  
[2025-03-18 14:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708677', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708677', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:09:26] Production.INFO: ==4922== Releasing lock...  
[2025-03-18 14:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:09:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:10:06
    [end_date_ymd] => 2025-03-18 14:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:10:06' and `end` < '2025-03-18 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-18 14:10:19] Production.INFO: count ==5022  
[2025-03-18 14:10:22] Production.ERROR: pbx CDR StartTime 2025-03-18 11:10:06 - End Time 2025-03-18 14:10:06  
[2025-03-18 14:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708683', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708683', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:10:22] Production.INFO: ProcessCDR(1,14708683,1,1,2)  
[2025-03-18 14:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708683,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708683,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708683', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708683', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:10:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:10:28] Production.INFO: ==5035== Releasing lock...  
[2025-03-18 14:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:10:28] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:11:06
    [end_date_ymd] => 2025-03-18 14:11:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:11:06' and `end` < '2025-03-18 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-18 14:11:19] Production.INFO: count ==5001  
[2025-03-18 14:11:22] Production.ERROR: pbx CDR StartTime 2025-03-18 11:11:06 - End Time 2025-03-18 14:11:06  
[2025-03-18 14:11:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708688', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:11:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708688', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:11:22] Production.INFO: ProcessCDR(1,14708688,1,1,2)  
[2025-03-18 14:11:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:11:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708688,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:11:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:11:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708688,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:11:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708688', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:11:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708688', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:11:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:11:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:11:28] Production.INFO: ==5111== Releasing lock...  
[2025-03-18 14:11:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:11:28] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:12:05
    [end_date_ymd] => 2025-03-18 14:12:05
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:12:05' and `end` < '2025-03-18 14: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-18 14:12:18] Production.INFO: count ==5014  
[2025-03-18 14:12:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:12:05 - End Time 2025-03-18 14:12:05  
[2025-03-18 14:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708693', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708693', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708693', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708693', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:12:21] Production.INFO: ProcessCDR(1,14708693,1,1,2)  
[2025-03-18 14:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708693,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:12:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708693,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:12:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708693,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708693,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708693', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708693', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:12:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:12:27] Production.INFO: ==5188== Releasing lock...  
[2025-03-18 14:12:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:12:27] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:13:05
    [end_date_ymd] => 2025-03-18 14:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:13:05' and `end` < '2025-03-18 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-18 14:13:18] Production.INFO: count ==5018  
[2025-03-18 14:13:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:13:05 - End Time 2025-03-18 14:13:05  
[2025-03-18 14:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708694', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708694', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708694', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708694', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:13:20] Production.INFO: ProcessCDR(1,14708694,1,1,2)  
[2025-03-18 14:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708694,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708694,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708694', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708694', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:13:25] Production.INFO: ==5257== Releasing lock...  
[2025-03-18 14:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:13:25] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:14:05
    [end_date_ymd] => 2025-03-18 14:14:05
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:14:05' and `end` < '2025-03-18 14: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-18 14:14:18] Production.INFO: count ==5018  
[2025-03-18 14:14:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:14:05 - End Time 2025-03-18 14:14:05  
[2025-03-18 14:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708703', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708703', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:14:20] Production.INFO: ProcessCDR(1,14708703,1,1,2)  
[2025-03-18 14:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:14:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:14:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:14:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:14:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:14:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:14:24] Production.INFO: ==5335== Releasing lock...  
[2025-03-18 14:14:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:14:24] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:15:05
    [end_date_ymd] => 2025-03-18 14:15:05
    [RateCDR] => 1
)
  
[2025-03-18 14:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:15:05' and `end` < '2025-03-18 14:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:15:18] Production.INFO: count ==4996  
[2025-03-18 14:15:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:15:05 - End Time 2025-03-18 14:15:05  
[2025-03-18 14:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708708', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708708', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:15:21] Production.INFO: ProcessCDR(1,14708708,1,1,2)  
[2025-03-18 14:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:15:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:15:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:15:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:15:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:15:25] Production.INFO: ==5412== Releasing lock...  
[2025-03-18 14:15:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:15:25] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:16:05
    [end_date_ymd] => 2025-03-18 14:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:16:05' and `end` < '2025-03-18 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-18 14:16:19] Production.INFO: count ==4990  
[2025-03-18 14:16:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:16:05 - End Time 2025-03-18 14:16:05  
[2025-03-18 14:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708713', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708713', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:16:21] Production.INFO: ProcessCDR(1,14708713,1,1,2)  
[2025-03-18 14:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:16:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:16:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:16:26] Production.INFO: ==5482== Releasing lock...  
[2025-03-18 14:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:16:26] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 14:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:17:05
    [end_date_ymd] => 2025-03-18 14:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:17:05' and `end` < '2025-03-18 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-18 14:17:19] Production.INFO: count ==5001  
[2025-03-18 14:17:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:17:05 - End Time 2025-03-18 14:17:05  
[2025-03-18 14:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708718', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708718', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708718', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708718', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:17:21] Production.INFO: ProcessCDR(1,14708718,1,1,2)  
[2025-03-18 14:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:17:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:17:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:17:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708718', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708718', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:17:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:17:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:17:26] Production.INFO: ==5555== Releasing lock...  
[2025-03-18 14:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:17:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:18:05
    [end_date_ymd] => 2025-03-18 14:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:18:05' and `end` < '2025-03-18 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-18 14:18:18] Production.INFO: count ==5013  
[2025-03-18 14:18:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:18:05 - End Time 2025-03-18 14:18:05  
[2025-03-18 14:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708723', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708723', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708723', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708723', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:18:21] Production.INFO: ProcessCDR(1,14708723,1,1,2)  
[2025-03-18 14:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708723', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708723', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:18:26] Production.INFO: ==5627== Releasing lock...  
[2025-03-18 14:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:18:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:19:05
    [end_date_ymd] => 2025-03-18 14:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:19:05' and `end` < '2025-03-18 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-18 14:19:19] Production.INFO: count ==5018  
[2025-03-18 14:19:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:19:05 - End Time 2025-03-18 14:19:05  
[2025-03-18 14:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708728', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708728', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708728', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708728', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:19:21] Production.INFO: ProcessCDR(1,14708728,1,1,2)  
[2025-03-18 14:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:19:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708728', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708728', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:19:26] Production.INFO: ==5697== Releasing lock...  
[2025-03-18 14:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:19:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:20:06
    [end_date_ymd] => 2025-03-18 14:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:20:06' and `end` < '2025-03-18 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-18 14:20:19] Production.INFO: count ==5018  
[2025-03-18 14:20:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:20:06 - End Time 2025-03-18 14:20:06  
[2025-03-18 14:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708734', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708734', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708734', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708734', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:20:22] Production.INFO: ProcessCDR(1,14708734,1,1,2)  
[2025-03-18 14:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708734,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708734,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708734,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:20:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708734,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708734', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708734', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:20:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:20:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:20:26] Production.INFO: ==5772== Releasing lock...  
[2025-03-18 14:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:20:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 14:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:21:05
    [end_date_ymd] => 2025-03-18 14:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:21:05' and `end` < '2025-03-18 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-18 14:21:18] Production.INFO: count ==5053  
[2025-03-18 14:21:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:21:05 - End Time 2025-03-18 14:21:05  
[2025-03-18 14:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708739', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708739', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708739', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708739', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:21:21] Production.INFO: ProcessCDR(1,14708739,1,1,2)  
[2025-03-18 14:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708739,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708739,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708739,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:21:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708739,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708739', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708739', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:21:26] Production.INFO: ==5847== Releasing lock...  
[2025-03-18 14:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:21:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 14:22:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:22:04
    [end_date_ymd] => 2025-03-18 14:22:04
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:22:04' and `end` < '2025-03-18 14: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-18 14:22:18] Production.INFO: count ==5044  
[2025-03-18 14:22:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:22:04 - End Time 2025-03-18 14:22:04  
[2025-03-18 14:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708744', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708744', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708744', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708744', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:22:20] Production.INFO: ProcessCDR(1,14708744,1,1,2)  
[2025-03-18 14:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708744,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708744,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708744,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:22:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708744,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708744', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708744', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:22:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:22:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:22:25] Production.INFO: ==5920== Releasing lock...  
[2025-03-18 14:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:22:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 14:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:23:05
    [end_date_ymd] => 2025-03-18 14:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:23:05' and `end` < '2025-03-18 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-18 14:23:19] Production.INFO: count ==5071  
[2025-03-18 14:23:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:23:05 - End Time 2025-03-18 14:23:05  
[2025-03-18 14:23:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708749', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708749', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708749', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708749', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:23:21] Production.INFO: ProcessCDR(1,14708749,1,1,2)  
[2025-03-18 14:23:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708749,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:23:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708749,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:23:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708749,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:23:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708749,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708749', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708749', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:23:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:23:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:23:27] Production.INFO: ==5991== Releasing lock...  
[2025-03-18 14:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:23:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 14:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:24:05
    [end_date_ymd] => 2025-03-18 14:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:24:05' and `end` < '2025-03-18 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-18 14:24:18] Production.INFO: count ==5063  
[2025-03-18 14:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:24:05 - End Time 2025-03-18 14:24:05  
[2025-03-18 14:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708754', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708754', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708754', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708754', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:24:20] Production.INFO: ProcessCDR(1,14708754,1,1,2)  
[2025-03-18 14:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708754', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708754', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:24:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:24:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:24:25] Production.INFO: ==6063== Releasing lock...  
[2025-03-18 14:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:24:25] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 14:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:25:05
    [end_date_ymd] => 2025-03-18 14:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:25:05' and `end` < '2025-03-18 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-18 14:25:18] Production.INFO: count ==5064  
[2025-03-18 14:25:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:25:05 - End Time 2025-03-18 14:25:05  
[2025-03-18 14:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708759', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708759', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:25:21] Production.INFO: ProcessCDR(1,14708759,1,1,2)  
[2025-03-18 14:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:25:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:25:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:25:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:25:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:25:26] Production.INFO: ==6174== Releasing lock...  
[2025-03-18 14:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:25:26] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 14:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:26:06
    [end_date_ymd] => 2025-03-18 14:26:06
    [RateCDR] => 1
)
  
[2025-03-18 14:26:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:26:06' and `end` < '2025-03-18 14:26:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:26:19] Production.INFO: count ==5048  
[2025-03-18 14:26:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:26:06 - End Time 2025-03-18 14:26:06  
[2025-03-18 14:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708764', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708764', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:26:21] Production.INFO: ProcessCDR(1,14708764,1,1,2)  
[2025-03-18 14:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:26:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:26:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:26:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:26:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:26:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:26:26] Production.INFO: ==6247== Releasing lock...  
[2025-03-18 14:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:26:26] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 14:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:27:05
    [end_date_ymd] => 2025-03-18 14:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:27:05' and `end` < '2025-03-18 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-18 14:27:18] Production.INFO: count ==5036  
[2025-03-18 14:27:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:27:05 - End Time 2025-03-18 14:27:05  
[2025-03-18 14:27:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708769', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708769', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708769', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:27:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708769', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:27:20] Production.INFO: ProcessCDR(1,14708769,1,1,2)  
[2025-03-18 14:27:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:27:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708769', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:27:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708769', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:27:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:27:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:27:25] Production.INFO: ==6320== Releasing lock...  
[2025-03-18 14:27:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:27:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 14:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:28:06
    [end_date_ymd] => 2025-03-18 14:28:06
    [RateCDR] => 1
)
  
[2025-03-18 14:28:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:28:06' and `end` < '2025-03-18 14:28:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:28:19] Production.INFO: count ==5076  
[2025-03-18 14:28:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:28:06 - End Time 2025-03-18 14:28:06  
[2025-03-18 14:28:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708774', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708774', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708774', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708774', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:28:21] Production.INFO: ProcessCDR(1,14708774,1,1,2)  
[2025-03-18 14:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:28:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:28:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:28:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:28:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708774', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:28:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708774', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:28:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:28:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:28:27] Production.INFO: ==6399== Releasing lock...  
[2025-03-18 14:28:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:28:27] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 14:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:29:05
    [end_date_ymd] => 2025-03-18 14:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:29:05' and `end` < '2025-03-18 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-18 14:29:18] Production.INFO: count ==5069  
[2025-03-18 14:29:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:29:05 - End Time 2025-03-18 14:29:05  
[2025-03-18 14:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708779', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708779', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708779', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708779', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:29:20] Production.INFO: ProcessCDR(1,14708779,1,1,2)  
[2025-03-18 14:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708779', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708779', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:29:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:29:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:29:25] Production.INFO: ==6470== Releasing lock...  
[2025-03-18 14:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:29:25] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 14:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:30:06
    [end_date_ymd] => 2025-03-18 14:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:30:06' and `end` < '2025-03-18 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-18 14:30:19] Production.INFO: count ==5075  
[2025-03-18 14:30:22] Production.ERROR: pbx CDR StartTime 2025-03-18 11:30:06 - End Time 2025-03-18 14:30:06  
[2025-03-18 14:30:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708785', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708785', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708785', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708785', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:30:22] Production.INFO: ProcessCDR(1,14708785,1,1,2)  
[2025-03-18 14:30:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:30:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708785,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:30:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:30:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708785,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:30:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708785', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:30:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708785', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:30:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:30:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:30:28] Production.INFO: ==6557== Releasing lock...  
[2025-03-18 14:30:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:30:28] Production.INFO: 66 MB  #Memory Used#   
[2025-03-18 14:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:31:05
    [end_date_ymd] => 2025-03-18 14:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:31:05' and `end` < '2025-03-18 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-18 14:31:18] Production.INFO: count ==5141  
[2025-03-18 14:31:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:31:05 - End Time 2025-03-18 14:31:05  
[2025-03-18 14:31:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708790', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708790', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708790', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:31:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708790', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:31:20] Production.INFO: ProcessCDR(1,14708790,1,1,2)  
[2025-03-18 14:31:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708790,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708790,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708790,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:31:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708790,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708790', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708790', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:31:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:31:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:31:26] Production.INFO: ==6637== Releasing lock...  
[2025-03-18 14:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:31:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 14:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:32:05
    [end_date_ymd] => 2025-03-18 14:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:32:05' and `end` < '2025-03-18 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-18 14:32:19] Production.INFO: count ==5146  
[2025-03-18 14:32:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:32:05 - End Time 2025-03-18 14:32:05  
[2025-03-18 14:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708795', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708795', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708795', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708795', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:32:21] Production.INFO: ProcessCDR(1,14708795,1,1,2)  
[2025-03-18 14:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:32:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708795,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:32:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708795,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708795', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708795', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:32:26] Production.INFO: ==6713== Releasing lock...  
[2025-03-18 14:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:32:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 14:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:33:05
    [end_date_ymd] => 2025-03-18 14:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:33:05' and `end` < '2025-03-18 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-18 14:33:18] Production.INFO: count ==5172  
[2025-03-18 14:33:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:33:05 - End Time 2025-03-18 14:33:05  
[2025-03-18 14:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708800', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708800', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708800', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708800', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:33:21] Production.INFO: ProcessCDR(1,14708800,1,1,2)  
[2025-03-18 14:33:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708800,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708800,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708800,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:33:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708800,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708800', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708800', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:33:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:33:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:33:26] Production.INFO: ==6786== Releasing lock...  
[2025-03-18 14:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:33:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:34:05
    [end_date_ymd] => 2025-03-18 14:34:05
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:34:05' and `end` < '2025-03-18 14: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-18 14:34:18] Production.INFO: count ==5171  
[2025-03-18 14:34:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:34:05 - End Time 2025-03-18 14:34:05  
[2025-03-18 14:34:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708805', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708805', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708805', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708805', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:34:21] Production.INFO: ProcessCDR(1,14708805,1,1,2)  
[2025-03-18 14:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708805,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708805,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708805,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708805,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708805', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708805', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:34:26] Production.INFO: ==6860== Releasing lock...  
[2025-03-18 14:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:34:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:35:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:35:04
    [end_date_ymd] => 2025-03-18 14:35:04
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:35:04' and `end` < '2025-03-18 14: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-18 14:35:18] Production.INFO: count ==5165  
[2025-03-18 14:35:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:35:04 - End Time 2025-03-18 14:35:04  
[2025-03-18 14:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708810', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708810', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:35:20] Production.INFO: ProcessCDR(1,14708810,1,1,2)  
[2025-03-18 14:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:35:26] Production.INFO: ==6932== Releasing lock...  
[2025-03-18 14:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:35:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:36:05
    [end_date_ymd] => 2025-03-18 14:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:36:05' and `end` < '2025-03-18 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-18 14:36:18] Production.INFO: count ==5185  
[2025-03-18 14:36:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:36:05 - End Time 2025-03-18 14:36:05  
[2025-03-18 14:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708815', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708815', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:36:20] Production.INFO: ProcessCDR(1,14708815,1,1,2)  
[2025-03-18 14:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:36:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:36:26] Production.INFO: ==7003== Releasing lock...  
[2025-03-18 14:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:36:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:37:05
    [end_date_ymd] => 2025-03-18 14:37:05
    [RateCDR] => 1
)
  
[2025-03-18 14:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:37:05' and `end` < '2025-03-18 14:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:37:18] Production.INFO: count ==5181  
[2025-03-18 14:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:37:05 - End Time 2025-03-18 14:37:05  
[2025-03-18 14:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708820', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708820', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708820', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708820', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:37:21] Production.INFO: ProcessCDR(1,14708820,1,1,2)  
[2025-03-18 14:37:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:37:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:37:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:37:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708820', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708820', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:37:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:37:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:37:26] Production.INFO: ==7077== Releasing lock...  
[2025-03-18 14:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:37:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:38:05
    [end_date_ymd] => 2025-03-18 14:38:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:38:05' and `end` < '2025-03-18 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-18 14:38:18] Production.INFO: count ==5162  
[2025-03-18 14:38:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:38:05 - End Time 2025-03-18 14:38:05  
[2025-03-18 14:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708825', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708825', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708825', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708825', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:38:20] Production.INFO: ProcessCDR(1,14708825,1,1,2)  
[2025-03-18 14:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708825', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708825', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:38:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:38:25] Production.INFO: ==7150== Releasing lock...  
[2025-03-18 14:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:38:25] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:39:06
    [end_date_ymd] => 2025-03-18 14:39:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:39:06' and `end` < '2025-03-18 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-18 14:39:19] Production.INFO: count ==5163  
[2025-03-18 14:39:22] Production.ERROR: pbx CDR StartTime 2025-03-18 11:39:06 - End Time 2025-03-18 14:39:06  
[2025-03-18 14:39:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:39:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708830', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:39:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708830', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:39:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708830', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:39:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708830', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:39:22] Production.INFO: ProcessCDR(1,14708830,1,1,2)  
[2025-03-18 14:39:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:39:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:39:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:39:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:39:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708830', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:39:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708830', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:39:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:39:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:39:27] Production.INFO: ==7220== Releasing lock...  
[2025-03-18 14:39:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:39:27] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:40:06
    [end_date_ymd] => 2025-03-18 14:40:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:40:06' and `end` < '2025-03-18 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-18 14:40:19] Production.INFO: count ==5164  
[2025-03-18 14:40:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:40:06 - End Time 2025-03-18 14:40:06  
[2025-03-18 14:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708836', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708836', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708836', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708836', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:40:21] Production.INFO: ProcessCDR(1,14708836,1,1,2)  
[2025-03-18 14:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708836,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708836,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708836,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708836,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708836', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708836', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:40:26] Production.INFO: ==7298== Releasing lock...  
[2025-03-18 14:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:40:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 14:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:41:06
    [end_date_ymd] => 2025-03-18 14:41:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:41:06' and `end` < '2025-03-18 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-18 14:41:19] Production.INFO: count ==5203  
[2025-03-18 14:41:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:41:06 - End Time 2025-03-18 14:41:06  
[2025-03-18 14:41:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708841', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708841', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708841', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708841', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:41:21] Production.INFO: ProcessCDR(1,14708841,1,1,2)  
[2025-03-18 14:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:41:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708841,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:41:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708841,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708841', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:41:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708841', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:41:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:41:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:41:27] Production.INFO: ==7412== Releasing lock...  
[2025-03-18 14:41:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:41:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:42:05
    [end_date_ymd] => 2025-03-18 14:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:42:05' and `end` < '2025-03-18 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-18 14:42:19] Production.INFO: count ==5215  
[2025-03-18 14:42:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:42:05 - End Time 2025-03-18 14:42:05  
[2025-03-18 14:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708846', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708846', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708846', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708846', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:42:21] Production.INFO: ProcessCDR(1,14708846,1,1,2)  
[2025-03-18 14:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708846,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:42:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708846,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:42:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708846,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708846,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708846', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708846', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:42:26] Production.INFO: ==7487== Releasing lock...  
[2025-03-18 14:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:42:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:43:05
    [end_date_ymd] => 2025-03-18 14:43:05
    [RateCDR] => 1
)
  
[2025-03-18 14:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:43:05' and `end` < '2025-03-18 14:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:43:19] Production.INFO: count ==5197  
[2025-03-18 14:43:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:43:05 - End Time 2025-03-18 14:43:05  
[2025-03-18 14:43:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708851', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708851', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708851', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708851', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:43:21] Production.INFO: ProcessCDR(1,14708851,1,1,2)  
[2025-03-18 14:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708851,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:43:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708851,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:43:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708851,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:43:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708851,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708851', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708851', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:43:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:43:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:43:26] Production.INFO: ==7561== Releasing lock...  
[2025-03-18 14:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:43:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:44:05
    [end_date_ymd] => 2025-03-18 14:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:44:05' and `end` < '2025-03-18 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-18 14:44:18] Production.INFO: count ==5207  
[2025-03-18 14:44:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:44:05 - End Time 2025-03-18 14:44:05  
[2025-03-18 14:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708856', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708856', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708856', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708856', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:44:20] Production.INFO: ProcessCDR(1,14708856,1,1,2)  
[2025-03-18 14:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708856,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:44:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708856,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708856', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708856', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:44:26] Production.INFO: ==7635== Releasing lock...  
[2025-03-18 14:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:44:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:45:06
    [end_date_ymd] => 2025-03-18 14:45:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:45:06' and `end` < '2025-03-18 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-18 14:45:19] Production.INFO: count ==5209  
[2025-03-18 14:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:45:06 - End Time 2025-03-18 14:45:06  
[2025-03-18 14:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708861', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:45:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708861', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:45:22] Production.INFO: ProcessCDR(1,14708861,1,1,2)  
[2025-03-18 14:45:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:45:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:45:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:45:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:45:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:45:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:45:27] Production.INFO: ==7706== Releasing lock...  
[2025-03-18 14:45:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:45:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:46:05
    [end_date_ymd] => 2025-03-18 14:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:46:05' and `end` < '2025-03-18 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-18 14:46:18] Production.INFO: count ==5229  
[2025-03-18 14:46:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:46:05 - End Time 2025-03-18 14:46:05  
[2025-03-18 14:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708866', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708866', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708866', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708866', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:46:21] Production.INFO: ProcessCDR(1,14708866,1,1,2)  
[2025-03-18 14:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708866', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708866', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:46:26] Production.INFO: ==7780== Releasing lock...  
[2025-03-18 14:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:46:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:47:05
    [end_date_ymd] => 2025-03-18 14:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:47:05' and `end` < '2025-03-18 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-18 14:47:18] Production.INFO: count ==5240  
[2025-03-18 14:47:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:47:05 - End Time 2025-03-18 14:47:05  
[2025-03-18 14:47:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708871', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708871', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708871', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708871', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:47:21] Production.INFO: ProcessCDR(1,14708871,1,1,2)  
[2025-03-18 14:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:47:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:47:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:47:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708871', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708871', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:47:26] Production.INFO: ==7852== Releasing lock...  
[2025-03-18 14:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:47:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:48:05
    [end_date_ymd] => 2025-03-18 14:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:48:05' and `end` < '2025-03-18 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-18 14:48:18] Production.INFO: count ==5234  
[2025-03-18 14:48:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:48:05 - End Time 2025-03-18 14:48:05  
[2025-03-18 14:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708876', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708876', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708876', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708876', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:48:21] Production.INFO: ProcessCDR(1,14708876,1,1,2)  
[2025-03-18 14:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:48:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708876', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:48:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708876', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:48:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:48:26] Production.INFO: ==7924== Releasing lock...  
[2025-03-18 14:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:48:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:49:05
    [end_date_ymd] => 2025-03-18 14:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:49:05' and `end` < '2025-03-18 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-18 14:49:18] Production.INFO: count ==5235  
[2025-03-18 14:49:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:49:05 - End Time 2025-03-18 14:49:05  
[2025-03-18 14:49:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708881', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708881', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708881', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708881', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:49:21] Production.INFO: ProcessCDR(1,14708881,1,1,2)  
[2025-03-18 14:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:49:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708881', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708881', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:49:26] Production.INFO: ==7995== Releasing lock...  
[2025-03-18 14:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:49:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:50:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:50:07
    [end_date_ymd] => 2025-03-18 14:50:07
    [RateCDR] => 1
)
  
[2025-03-18 14:50:07] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 11:50:07' and `end` < '2025-03-18 14:50:07'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 14:50:20] Production.INFO: count ==5223  
[2025-03-18 14:50:22] Production.ERROR: pbx CDR StartTime 2025-03-18 11:50:07 - End Time 2025-03-18 14:50:07  
[2025-03-18 14:50:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708887', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708887', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708887', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708887', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:50:22] Production.INFO: ProcessCDR(1,14708887,1,1,2)  
[2025-03-18 14:50:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:50:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708887,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:50:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:50:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708887,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:50:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708887', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:50:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708887', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:50:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:50:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:50:27] Production.INFO: ==8072== Releasing lock...  
[2025-03-18 14:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:50:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:51:05
    [end_date_ymd] => 2025-03-18 14:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:51:05' and `end` < '2025-03-18 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-18 14:51:18] Production.INFO: count ==5245  
[2025-03-18 14:51:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:51:05 - End Time 2025-03-18 14:51:05  
[2025-03-18 14:51:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708892', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708892', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708892', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708892', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:51:21] Production.INFO: ProcessCDR(1,14708892,1,1,2)  
[2025-03-18 14:51:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708892,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708892,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708892,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:51:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708892,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708892', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708892', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:51:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:51:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:51:26] Production.INFO: ==8154== Releasing lock...  
[2025-03-18 14:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:51:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:52:05
    [end_date_ymd] => 2025-03-18 14:52:05
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:52:05' and `end` < '2025-03-18 14: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-18 14:52:18] Production.INFO: count ==5235  
[2025-03-18 14:52:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:52:05 - End Time 2025-03-18 14:52:05  
[2025-03-18 14:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708897', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708897', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708897', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708897', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:52:20] Production.INFO: ProcessCDR(1,14708897,1,1,2)  
[2025-03-18 14:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708897,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708897,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708897,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708897,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708897', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708897', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:52:25] Production.INFO: ==8224== Releasing lock...  
[2025-03-18 14:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:52:25] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:53:05
    [end_date_ymd] => 2025-03-18 14:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:53:05' and `end` < '2025-03-18 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-18 14:53:19] Production.INFO: count ==5231  
[2025-03-18 14:53:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:53:05 - End Time 2025-03-18 14:53:05  
[2025-03-18 14:53:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708902', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708902', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708902', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708902', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:53:21] Production.INFO: ProcessCDR(1,14708902,1,1,2)  
[2025-03-18 14:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708902,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708902,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708902,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708902,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708902', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708902', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:53:26] Production.INFO: ==8298== Releasing lock...  
[2025-03-18 14:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:53:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 14:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:54:06
    [end_date_ymd] => 2025-03-18 14:54:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:54:06' and `end` < '2025-03-18 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-18 14:54:19] Production.INFO: count ==5223  
[2025-03-18 14:54:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:54:06 - End Time 2025-03-18 14:54:06  
[2025-03-18 14:54:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708907', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708907', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:54:21] Production.INFO: ProcessCDR(1,14708907,1,1,2)  
[2025-03-18 14:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:54:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:54:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:54:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:54:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:54:26] Production.INFO: ==8373== Releasing lock...  
[2025-03-18 14:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:54:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:55:05
    [end_date_ymd] => 2025-03-18 14:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:55:05' and `end` < '2025-03-18 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-18 14:55:19] Production.INFO: count ==5212  
[2025-03-18 14:55:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:55:05 - End Time 2025-03-18 14:55:05  
[2025-03-18 14:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708912', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708912', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:55:21] Production.INFO: ProcessCDR(1,14708912,1,1,2)  
[2025-03-18 14:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:55:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:55:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:55:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:55:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:55:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:55:26] Production.INFO: ==8443== Releasing lock...  
[2025-03-18 14:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:55:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:56:05
    [end_date_ymd] => 2025-03-18 14:56:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:56:05' and `end` < '2025-03-18 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-18 14:56:18] Production.INFO: count ==5215  
[2025-03-18 14:56:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:56:05 - End Time 2025-03-18 14:56:05  
[2025-03-18 14:56:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708917', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708917', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708917', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708917', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:56:21] Production.INFO: ProcessCDR(1,14708917,1,1,2)  
[2025-03-18 14:56:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:56:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:56:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:56:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708917', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708917', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:56:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:56:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:56:26] Production.INFO: ==8556== Releasing lock...  
[2025-03-18 14:56:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:56:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:57:06
    [end_date_ymd] => 2025-03-18 14:57:06
    [RateCDR] => 1
)
  
[2025-03-18 14: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-18 11:57:06' and `end` < '2025-03-18 14: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-18 14:57:19] Production.INFO: count ==5209  
[2025-03-18 14:57:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:57:06 - End Time 2025-03-18 14:57:06  
[2025-03-18 14:57:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708922', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708922', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708922', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708922', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:57:21] Production.INFO: ProcessCDR(1,14708922,1,1,2)  
[2025-03-18 14:57:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:57:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:57:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:57:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708922', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:57:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708922', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:57:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:57:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:57:27] Production.INFO: ==8628== Releasing lock...  
[2025-03-18 14:57:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:57:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:58:06
    [end_date_ymd] => 2025-03-18 14:58:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:58:06' and `end` < '2025-03-18 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-18 14:58:19] Production.INFO: count ==5201  
[2025-03-18 14:58:21] Production.ERROR: pbx CDR StartTime 2025-03-18 11:58:06 - End Time 2025-03-18 14:58:06  
[2025-03-18 14:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708927', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708927', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708927', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708927', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:58:21] Production.INFO: ProcessCDR(1,14708927,1,1,2)  
[2025-03-18 14:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:58:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:58:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708927', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:58:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708927', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:58:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:58:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:58:27] Production.INFO: ==8701== Releasing lock...  
[2025-03-18 14:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:58:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 14:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 11:59:05
    [end_date_ymd] => 2025-03-18 14:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 11:59:05' and `end` < '2025-03-18 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-18 14:59:18] Production.INFO: count ==5210  
[2025-03-18 14:59:20] Production.ERROR: pbx CDR StartTime 2025-03-18 11:59:05 - End Time 2025-03-18 14:59:05  
[2025-03-18 14:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 14:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708932', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708932', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708932', 'tblTempVendorCDR_20' ) start  
[2025-03-18 14:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708932', 'tblTempVendorCDR_20' ) end  
[2025-03-18 14:59:21] Production.INFO: ProcessCDR(1,14708932,1,1,2)  
[2025-03-18 14:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 14:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 14:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708932', 'tblTempUsageDetail_20' ) start  
[2025-03-18 14:59:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708932', 'tblTempUsageDetail_20' ) end  
[2025-03-18 14:59:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 14:59:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 14:59:26] Production.INFO: ==8771== Releasing lock...  
[2025-03-18 14:59:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 14:59:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 15:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:00:07
    [end_date_ymd] => 2025-03-18 15:00:07
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:00:07' and `end` < '2025-03-18 15: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-18 15:00:20] Production.INFO: count ==5209  
[2025-03-18 15:00:22] Production.ERROR: pbx CDR StartTime 2025-03-18 12:00:07 - End Time 2025-03-18 15:00:07  
[2025-03-18 15:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708937', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708937', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708937', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:00:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708937', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:00:23] Production.INFO: ProcessCDR(1,14708937,1,1,2)  
[2025-03-18 15:00:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:00:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:00:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:00:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708937', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708937', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:00:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:00:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:00:28] Production.INFO: ==8849== Releasing lock...  
[2025-03-18 15:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:00:28] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 15:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:01:05
    [end_date_ymd] => 2025-03-18 15:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:01:05' and `end` < '2025-03-18 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-18 15:01:19] Production.INFO: count ==5239  
[2025-03-18 15:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:01:05 - End Time 2025-03-18 15:01:05  
[2025-03-18 15:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708943', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708943', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708943', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708943', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:01:21] Production.INFO: ProcessCDR(1,14708943,1,1,2)  
[2025-03-18 15:01:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708943,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708943,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708943,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:01:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708943,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708943', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708943', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:01:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:01:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:01:26] Production.INFO: ==9016== Releasing lock...  
[2025-03-18 15:01:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:01:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 15:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:02:06
    [end_date_ymd] => 2025-03-18 15:02:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:02:06' and `end` < '2025-03-18 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-18 15:02:20] Production.INFO: count ==5267  
[2025-03-18 15:02:23] Production.ERROR: pbx CDR StartTime 2025-03-18 12:02:06 - End Time 2025-03-18 15:02:06  
[2025-03-18 15:02:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:02:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708948', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:02:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708948', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:02:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708948', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:02:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708948', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:02:23] Production.INFO: ProcessCDR(1,14708948,1,1,2)  
[2025-03-18 15:02:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708948,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:02:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708948,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:02:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708948,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:02:29] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708948,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:02:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708948', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:02:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708948', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:02:29] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:02:29] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:02:29] Production.INFO: ==9087== Releasing lock...  
[2025-03-18 15:02:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:02:29] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 15:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:03:06
    [end_date_ymd] => 2025-03-18 15:03:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:03:06' and `end` < '2025-03-18 15: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-18 15:03:21] Production.INFO: count ==5272  
[2025-03-18 15:03:23] Production.ERROR: pbx CDR StartTime 2025-03-18 12:03:06 - End Time 2025-03-18 15:03:06  
[2025-03-18 15:03:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:03:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708953', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:03:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708953', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:03:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708953', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:03:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708953', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:03:23] Production.INFO: ProcessCDR(1,14708953,1,1,2)  
[2025-03-18 15:03:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:03:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708953,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:03:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:03:29] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708953,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:03:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708953', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:03:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708953', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:03:29] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:03:29] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:03:30] Production.INFO: ==9160== Releasing lock...  
[2025-03-18 15:03:30] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:03:30] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 15:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:04:06
    [end_date_ymd] => 2025-03-18 15:04:06
    [RateCDR] => 1
)
  
[2025-03-18 15:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:04:06' and `end` < '2025-03-18 15:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:04:19] Production.INFO: count ==5339  
[2025-03-18 15:04:22] Production.ERROR: pbx CDR StartTime 2025-03-18 12:04:06 - End Time 2025-03-18 15:04:06  
[2025-03-18 15:04:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708958', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:04:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708958', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:04:22] Production.INFO: ProcessCDR(1,14708958,1,1,2)  
[2025-03-18 15:04:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:04:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:04:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:04:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:04:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:04:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:04:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:04:28] Production.INFO: ==9234== Releasing lock...  
[2025-03-18 15:04:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:04:28] Production.INFO: 68 MB  #Memory Used#   
[2025-03-18 15:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:05:06
    [end_date_ymd] => 2025-03-18 15:05:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:05:06' and `end` < '2025-03-18 15: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-18 15:05:19] Production.INFO: count ==5344  
[2025-03-18 15:05:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:05:06 - End Time 2025-03-18 15:05:06  
[2025-03-18 15:05:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708963', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708963', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:05:21] Production.INFO: ProcessCDR(1,14708963,1,1,2)  
[2025-03-18 15:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:05:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:05:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:05:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:05:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:05:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:05:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:05:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:05:27] Production.INFO: ==9382== Releasing lock...  
[2025-03-18 15:05:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:05:27] Production.INFO: 68 MB  #Memory Used#   
[2025-03-18 15:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:06:05
    [end_date_ymd] => 2025-03-18 15:06:05
    [RateCDR] => 1
)
  
[2025-03-18 15:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:06:05' and `end` < '2025-03-18 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-18 15:06:19] Production.INFO: count ==5361  
[2025-03-18 15:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:06:05 - End Time 2025-03-18 15:06:05  
[2025-03-18 15:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708968', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708968', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708968', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708968', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:06:22] Production.INFO: ProcessCDR(1,14708968,1,1,2)  
[2025-03-18 15:06:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:06:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708968', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:06:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708968', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:06:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:06:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:06:27] Production.INFO: ==9454== Releasing lock...  
[2025-03-18 15:06:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:06:27] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:07:06
    [end_date_ymd] => 2025-03-18 15:07:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:07:06' and `end` < '2025-03-18 15: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-18 15:07:19] Production.INFO: count ==5338  
[2025-03-18 15:07:22] Production.ERROR: pbx CDR StartTime 2025-03-18 12:07:06 - End Time 2025-03-18 15:07:06  
[2025-03-18 15:07:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708973', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708973', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708973', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:07:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708973', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:07:22] Production.INFO: ProcessCDR(1,14708973,1,1,2)  
[2025-03-18 15:07:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:07:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:07:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:07:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708973', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:07:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708973', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:07:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:07:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:07:28] Production.INFO: ==9526== Releasing lock...  
[2025-03-18 15:07:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:07:28] Production.INFO: 68 MB  #Memory Used#   
[2025-03-18 15:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:08:06
    [end_date_ymd] => 2025-03-18 15:08:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:08:06' and `end` < '2025-03-18 15: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-18 15:08:19] Production.INFO: count ==5351  
[2025-03-18 15:08:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:08:06 - End Time 2025-03-18 15:08:06  
[2025-03-18 15:08:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708978', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708978', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708978', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:08:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708978', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:08:22] Production.INFO: ProcessCDR(1,14708978,1,1,2)  
[2025-03-18 15:08:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:08:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:08:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:08:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:08:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708978', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:08:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708978', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:08:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:08:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:08:27] Production.INFO: ==9676== Releasing lock...  
[2025-03-18 15:08:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:08:27] Production.INFO: 68 MB  #Memory Used#   
[2025-03-18 15:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:09:05
    [end_date_ymd] => 2025-03-18 15:09:05
    [RateCDR] => 1
)
  
[2025-03-18 15:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:09:05' and `end` < '2025-03-18 15:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:09:19] Production.INFO: count ==5376  
[2025-03-18 15:09:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:09:05 - End Time 2025-03-18 15:09:05  
[2025-03-18 15:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708983', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708983', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708983', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708983', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:09:21] Production.INFO: ProcessCDR(1,14708983,1,1,2)  
[2025-03-18 15:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708983', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708983', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:09:26] Production.INFO: ==9749== Releasing lock...  
[2025-03-18 15:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:09:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:10:06
    [end_date_ymd] => 2025-03-18 15:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:10:06' and `end` < '2025-03-18 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-18 15:10:21] Production.INFO: count ==5386  
[2025-03-18 15:10:23] Production.ERROR: pbx CDR StartTime 2025-03-18 12:10:06 - End Time 2025-03-18 15:10:06  
[2025-03-18 15:10:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:10:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708989', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:10:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708989', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:10:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708989', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:10:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708989', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:10:23] Production.INFO: ProcessCDR(1,14708989,1,1,2)  
[2025-03-18 15:10:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708989,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:10:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708989,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:10:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708989,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:10:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708989,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708989', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:10:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708989', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:10:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:10:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:10:28] Production.INFO: ==9842== Releasing lock...  
[2025-03-18 15:10:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:10:28] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:11:05
    [end_date_ymd] => 2025-03-18 15:11:05
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:11:05' and `end` < '2025-03-18 15: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-18 15:11:18] Production.INFO: count ==5421  
[2025-03-18 15:11:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:11:05 - End Time 2025-03-18 15:11:05  
[2025-03-18 15:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708994', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708994', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708994', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708994', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:11:21] Production.INFO: ProcessCDR(1,14708994,1,1,2)  
[2025-03-18 15:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708994,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:11:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708994,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:11:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708994,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:11:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708994,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708994', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:11:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708994', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:11:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:11:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:11:26] Production.INFO: ==9923== Releasing lock...  
[2025-03-18 15:11:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:11:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:12:05
    [end_date_ymd] => 2025-03-18 15:12:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:12:05' and `end` < '2025-03-18 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-18 15:12:19] Production.INFO: count ==5447  
[2025-03-18 15:12:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:12:05 - End Time 2025-03-18 15:12:05  
[2025-03-18 15:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14708999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708999', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14708999', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:12:21] Production.INFO: ProcessCDR(1,14708999,1,1,2)  
[2025-03-18 15:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14708999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:12:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14708999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:12:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14708999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14708999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14708999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:12:26] Production.INFO: ==10114== Releasing lock...  
[2025-03-18 15:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:12:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:13:05
    [end_date_ymd] => 2025-03-18 15:13:05
    [RateCDR] => 1
)
  
[2025-03-18 15:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:13:05' and `end` < '2025-03-18 15:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:13:18] Production.INFO: count ==5450  
[2025-03-18 15:13:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:13:05 - End Time 2025-03-18 15:13:05  
[2025-03-18 15:13:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709004', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709004', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709004', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709004', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:13:21] Production.INFO: ProcessCDR(1,14709004,1,1,2)  
[2025-03-18 15:13:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709004,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709004,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709004,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:13:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709004,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709004', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709004', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:13:26] Production.INFO: ==10186== Releasing lock...  
[2025-03-18 15:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:13:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:14:05
    [end_date_ymd] => 2025-03-18 15:14:05
    [RateCDR] => 1
)
  
[2025-03-18 15:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:14:05' and `end` < '2025-03-18 15:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:14:19] Production.INFO: count ==5443  
[2025-03-18 15:14:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:14:05 - End Time 2025-03-18 15:14:05  
[2025-03-18 15:14:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709009', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709009', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709009', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709009', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:14:21] Production.INFO: ProcessCDR(1,14709009,1,1,2)  
[2025-03-18 15:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709009,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:14:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709009,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:14:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709009,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:14:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709009,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709009', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709009', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:14:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:14:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:14:26] Production.INFO: ==10260== Releasing lock...  
[2025-03-18 15:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:14:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:15:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:15:04
    [end_date_ymd] => 2025-03-18 15:15:04
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:15:04' and `end` < '2025-03-18 15: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-18 15:15:18] Production.INFO: count ==5446  
[2025-03-18 15:15:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:15:04 - End Time 2025-03-18 15:15:04  
[2025-03-18 15:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709014', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709014', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709014', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709014', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:15:20] Production.INFO: ProcessCDR(1,14709014,1,1,2)  
[2025-03-18 15:15:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709014,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:15:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709014,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:15:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709014,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:15:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709014,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709014', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709014', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:15:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:15:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:15:26] Production.INFO: ==10410== Releasing lock...  
[2025-03-18 15:15:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:15:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:16:05
    [end_date_ymd] => 2025-03-18 15:16:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:16:05' and `end` < '2025-03-18 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-18 15:16:19] Production.INFO: count ==5423  
[2025-03-18 15:16:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:16:05 - End Time 2025-03-18 15:16:05  
[2025-03-18 15:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709019', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709019', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709019', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709019', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:16:21] Production.INFO: ProcessCDR(1,14709019,1,1,2)  
[2025-03-18 15:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709019,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709019,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709019', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709019', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:16:26] Production.INFO: ==10483== Releasing lock...  
[2025-03-18 15:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:16:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:17:05
    [end_date_ymd] => 2025-03-18 15:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:17:05' and `end` < '2025-03-18 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-18 15:17:18] Production.INFO: count ==5429  
[2025-03-18 15:17:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:17:05 - End Time 2025-03-18 15:17:05  
[2025-03-18 15:17:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709024', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709024', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709024', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:17:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709024', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:17:20] Production.INFO: ProcessCDR(1,14709024,1,1,2)  
[2025-03-18 15:17:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:17:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709024,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:17:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:17:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709024,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709024', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:17:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709024', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:17:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:17:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:17:25] Production.INFO: ==10554== Releasing lock...  
[2025-03-18 15:17:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:17:25] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:18:05
    [end_date_ymd] => 2025-03-18 15:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:18:05' and `end` < '2025-03-18 15:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:18:19] Production.INFO: count ==5443  
[2025-03-18 15:18:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:18:05 - End Time 2025-03-18 15:18:05  
[2025-03-18 15:18:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709029', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709029', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709029', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:18:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709029', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:18:21] Production.INFO: ProcessCDR(1,14709029,1,1,2)  
[2025-03-18 15:18:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709029,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:18:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709029,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709029', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:18:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709029', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:18:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:18:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:18:26] Production.INFO: ==10624== Releasing lock...  
[2025-03-18 15:18:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:18:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:19:06
    [end_date_ymd] => 2025-03-18 15:19:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:19:06' and `end` < '2025-03-18 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-18 15:19:19] Production.INFO: count ==5431  
[2025-03-18 15:19:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:19:06 - End Time 2025-03-18 15:19:06  
[2025-03-18 15:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709034', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709034', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709034', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709034', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:19:21] Production.INFO: ProcessCDR(1,14709034,1,1,2)  
[2025-03-18 15:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:19:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709034,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:19:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:19:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709034,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709034', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709034', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:19:26] Production.INFO: ==10698== Releasing lock...  
[2025-03-18 15:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:19:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:20:06
    [end_date_ymd] => 2025-03-18 15:20:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:20:06' and `end` < '2025-03-18 15: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-18 15:20:19] Production.INFO: count ==5409  
[2025-03-18 15:20:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:20:06 - End Time 2025-03-18 15:20:06  
[2025-03-18 15:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709039', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709039', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709039', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709039', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:20:22] Production.INFO: ProcessCDR(1,14709039,1,1,2)  
[2025-03-18 15:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709039,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:20:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709039,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709039', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:20:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709039', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:20:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:20:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:20:27] Production.INFO: ==10773== Releasing lock...  
[2025-03-18 15:20:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:20:27] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:21:06
    [end_date_ymd] => 2025-03-18 15:21:06
    [RateCDR] => 1
)
  
[2025-03-18 15:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:21:06' and `end` < '2025-03-18 15:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:21:19] Production.INFO: count ==5431  
[2025-03-18 15:21:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:21:06 - End Time 2025-03-18 15:21:06  
[2025-03-18 15:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709045', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709045', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709045', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709045', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:21:21] Production.INFO: ProcessCDR(1,14709045,1,1,2)  
[2025-03-18 15:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709045,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:21:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709045,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:21:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709045,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:21:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709045,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709045', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:21:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709045', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:21:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:21:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:21:26] Production.INFO: ==10846== Releasing lock...  
[2025-03-18 15:21:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:21:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:22:05
    [end_date_ymd] => 2025-03-18 15:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:22:05' and `end` < '2025-03-18 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-18 15:22:18] Production.INFO: count ==5419  
[2025-03-18 15:22:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:22:05 - End Time 2025-03-18 15:22:05  
[2025-03-18 15:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709050', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709050', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709050', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709050', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:22:21] Production.INFO: ProcessCDR(1,14709050,1,1,2)  
[2025-03-18 15:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:22:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709050,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:22:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:22:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709050,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709050', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:22:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709050', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:22:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:22:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:22:26] Production.INFO: ==10919== Releasing lock...  
[2025-03-18 15:22:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:22:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:23:06
    [end_date_ymd] => 2025-03-18 15:23:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:23:06' and `end` < '2025-03-18 15: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-18 15:23:19] Production.INFO: count ==5414  
[2025-03-18 15:23:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:23:06 - End Time 2025-03-18 15:23:06  
[2025-03-18 15:23:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709055', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709055', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709055', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:23:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709055', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:23:22] Production.INFO: ProcessCDR(1,14709055,1,1,2)  
[2025-03-18 15:23:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709055,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:23:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709055,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:23:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709055,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:23:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709055,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709055', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:23:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709055', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:23:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:23:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:23:27] Production.INFO: ==10996== Releasing lock...  
[2025-03-18 15:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:23:27] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:24:05
    [end_date_ymd] => 2025-03-18 15:24:05
    [RateCDR] => 1
)
  
[2025-03-18 15:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:24:05' and `end` < '2025-03-18 15:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:24:18] Production.INFO: count ==5421  
[2025-03-18 15:24:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:24:05 - End Time 2025-03-18 15:24:05  
[2025-03-18 15:24:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709060', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709060', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709060', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709060', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:24:21] Production.INFO: ProcessCDR(1,14709060,1,1,2)  
[2025-03-18 15:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709060,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:24:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709060,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:24:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709060,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:24:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709060,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709060', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709060', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:24:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:24:27] Production.INFO: ==11068== Releasing lock...  
[2025-03-18 15:24:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:24:27] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:25:05
    [end_date_ymd] => 2025-03-18 15:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:25:05' and `end` < '2025-03-18 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-18 15:25:18] Production.INFO: count ==5418  
[2025-03-18 15:25:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:25:05 - End Time 2025-03-18 15:25:05  
[2025-03-18 15:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709065', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709065', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709065', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709065', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:25:21] Production.INFO: ProcessCDR(1,14709065,1,1,2)  
[2025-03-18 15:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709065,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:25:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709065,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:25:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709065', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:25:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709065', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:25:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:25:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:25:26] Production.INFO: ==11146== Releasing lock...  
[2025-03-18 15:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:25:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:26:05
    [end_date_ymd] => 2025-03-18 15:26:05
    [RateCDR] => 1
)
  
[2025-03-18 15:26:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:26:05' and `end` < '2025-03-18 15:26:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:26:19] Production.INFO: count ==5414  
[2025-03-18 15:26:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:26:05 - End Time 2025-03-18 15:26:05  
[2025-03-18 15:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709070', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709070', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709070', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709070', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:26:21] Production.INFO: ProcessCDR(1,14709070,1,1,2)  
[2025-03-18 15:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:26:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709070,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:26:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:26:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709070,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709070', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709070', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:26:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:26:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:26:26] Production.INFO: ==11220== Releasing lock...  
[2025-03-18 15:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:26:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:27:05
    [end_date_ymd] => 2025-03-18 15:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:27:05' and `end` < '2025-03-18 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-18 15:27:18] Production.INFO: count ==5439  
[2025-03-18 15:27:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:27:05 - End Time 2025-03-18 15:27:05  
[2025-03-18 15:27:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709075', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709075', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709075', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709075', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:27:21] Production.INFO: ProcessCDR(1,14709075,1,1,2)  
[2025-03-18 15:27:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709075,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:27:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709075,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709075', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709075', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:27:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:27:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:27:26] Production.INFO: ==11332== Releasing lock...  
[2025-03-18 15:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:27:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:28:05
    [end_date_ymd] => 2025-03-18 15:28:05
    [RateCDR] => 1
)
  
[2025-03-18 15:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:28:05' and `end` < '2025-03-18 15:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:28:18] Production.INFO: count ==5437  
[2025-03-18 15:28:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:28:05 - End Time 2025-03-18 15:28:05  
[2025-03-18 15:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709080', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709080', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709080', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709080', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:28:20] Production.INFO: ProcessCDR(1,14709080,1,1,2)  
[2025-03-18 15:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709080,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709080,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709080', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709080', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:28:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:28:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:28:25] Production.INFO: ==11401== Releasing lock...  
[2025-03-18 15:28:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:28:25] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:29:05
    [end_date_ymd] => 2025-03-18 15:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:29:05' and `end` < '2025-03-18 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-18 15:29:19] Production.INFO: count ==5417  
[2025-03-18 15:29:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:29:05 - End Time 2025-03-18 15:29:05  
[2025-03-18 15:29:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709085', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709085', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709085', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709085', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:29:21] Production.INFO: ProcessCDR(1,14709085,1,1,2)  
[2025-03-18 15:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:29:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709085,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:29:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:29:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709085,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709085', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709085', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:29:26] Production.INFO: ==11475== Releasing lock...  
[2025-03-18 15:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:29:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:30:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:30:05
    [end_date_ymd] => 2025-03-18 15:30:05
    [RateCDR] => 1
)
  
[2025-03-18 15:30:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:30:05' and `end` < '2025-03-18 15:30:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:30:18] Production.INFO: count ==5418  
[2025-03-18 15:30:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:30:05 - End Time 2025-03-18 15:30:05  
[2025-03-18 15:30:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709090', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709090', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709090', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709090', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:30:21] Production.INFO: ProcessCDR(1,14709090,1,1,2)  
[2025-03-18 15:30:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:30:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709090,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:30:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:30:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709090,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709090', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:30:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709090', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:30:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:30:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:30:25] Production.INFO: ==11555== Releasing lock...  
[2025-03-18 15:30:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:30:25] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:31:05
    [end_date_ymd] => 2025-03-18 15:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:31:05' and `end` < '2025-03-18 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-18 15:31:20] Production.INFO: count ==5422  
[2025-03-18 15:31:23] Production.ERROR: pbx CDR StartTime 2025-03-18 12:31:05 - End Time 2025-03-18 15:31:05  
[2025-03-18 15:31:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:31:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709096', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:31:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709096', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:31:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709096', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:31:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709096', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:31:23] Production.INFO: ProcessCDR(1,14709096,1,1,2)  
[2025-03-18 15:31:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709096,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:31:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709096,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:31:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709096,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:31:29] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709096,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:31:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709096', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:31:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709096', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:31:29] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:31:29] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:31:29] Production.INFO: ==11629== Releasing lock...  
[2025-03-18 15:31:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:31:29] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:32:05
    [end_date_ymd] => 2025-03-18 15:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:32:05' and `end` < '2025-03-18 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-18 15:32:18] Production.INFO: count ==5422  
[2025-03-18 15:32:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:32:05 - End Time 2025-03-18 15:32:05  
[2025-03-18 15:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709101', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709101', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709101', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709101', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:32:21] Production.INFO: ProcessCDR(1,14709101,1,1,2)  
[2025-03-18 15:32:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709101,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709101,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709101,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:32:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709101,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709101', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:32:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709101', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:32:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:32:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:32:26] Production.INFO: ==11701== Releasing lock...  
[2025-03-18 15:32:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:32:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:33:05
    [end_date_ymd] => 2025-03-18 15:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:33:05' and `end` < '2025-03-18 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-18 15:33:18] Production.INFO: count ==5418  
[2025-03-18 15:33:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:33:05 - End Time 2025-03-18 15:33:05  
[2025-03-18 15:33:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709106', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709106', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709106', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709106', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:33:21] Production.INFO: ProcessCDR(1,14709106,1,1,2)  
[2025-03-18 15:33:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709106,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709106,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709106', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709106', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:33:25] Production.INFO: ==11776== Releasing lock...  
[2025-03-18 15:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:33:25] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:34:05
    [end_date_ymd] => 2025-03-18 15:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:34:05' and `end` < '2025-03-18 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-18 15:34:18] Production.INFO: count ==5423  
[2025-03-18 15:34:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:34:05 - End Time 2025-03-18 15:34:05  
[2025-03-18 15:34:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709111', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709111', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709111', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709111', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:34:21] Production.INFO: ProcessCDR(1,14709111,1,1,2)  
[2025-03-18 15:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709111,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709111,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709111', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709111', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:34:26] Production.INFO: ==11847== Releasing lock...  
[2025-03-18 15:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:34:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:35:05
    [end_date_ymd] => 2025-03-18 15:35:05
    [RateCDR] => 1
)
  
[2025-03-18 15:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:35:05' and `end` < '2025-03-18 15:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:35:19] Production.INFO: count ==5414  
[2025-03-18 15:35:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:35:05 - End Time 2025-03-18 15:35:05  
[2025-03-18 15:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709116', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709116', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709116', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709116', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:35:21] Production.INFO: ProcessCDR(1,14709116,1,1,2)  
[2025-03-18 15:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:35:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709116,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:35:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:35:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709116,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709116', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709116', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:35:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:35:26] Production.INFO: ==11933== Releasing lock...  
[2025-03-18 15:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:35:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:36:05
    [end_date_ymd] => 2025-03-18 15:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:36:05' and `end` < '2025-03-18 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-18 15:36:18] Production.INFO: count ==5415  
[2025-03-18 15:36:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:36:05 - End Time 2025-03-18 15:36:05  
[2025-03-18 15:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709121', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709121', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709121', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709121', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:36:21] Production.INFO: ProcessCDR(1,14709121,1,1,2)  
[2025-03-18 15:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709121,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709121,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709121', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709121', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:36:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:36:26] Production.INFO: ==12004== Releasing lock...  
[2025-03-18 15:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:36:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:37:05
    [end_date_ymd] => 2025-03-18 15:37:05
    [RateCDR] => 1
)
  
[2025-03-18 15:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:37:05' and `end` < '2025-03-18 15:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:37:19] Production.INFO: count ==5408  
[2025-03-18 15:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:37:05 - End Time 2025-03-18 15:37:05  
[2025-03-18 15:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709126', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709126', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709126', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709126', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:37:21] Production.INFO: ProcessCDR(1,14709126,1,1,2)  
[2025-03-18 15:37:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:37:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709126,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:37:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:37:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709126,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709126', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:37:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709126', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:37:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:37:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:37:27] Production.INFO: ==12077== Releasing lock...  
[2025-03-18 15:37:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:37:27] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:38:06
    [end_date_ymd] => 2025-03-18 15:38:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:38:06' and `end` < '2025-03-18 15: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-18 15:38:19] Production.INFO: count ==5414  
[2025-03-18 15:38:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:38:06 - End Time 2025-03-18 15:38:06  
[2025-03-18 15:38:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709131', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709131', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709131', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709131', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:38:21] Production.INFO: ProcessCDR(1,14709131,1,1,2)  
[2025-03-18 15:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:38:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709131,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:38:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:38:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709131,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709131', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709131', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:38:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:38:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:38:26] Production.INFO: ==12153== Releasing lock...  
[2025-03-18 15:38:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:38:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:39:05
    [end_date_ymd] => 2025-03-18 15:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:39:05' and `end` < '2025-03-18 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-18 15:39:18] Production.INFO: count ==5403  
[2025-03-18 15:39:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:39:05 - End Time 2025-03-18 15:39:05  
[2025-03-18 15:39:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709136', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709136', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709136', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709136', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:39:21] Production.INFO: ProcessCDR(1,14709136,1,1,2)  
[2025-03-18 15:39:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:39:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709136,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:39:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:39:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709136,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709136', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:39:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709136', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:39:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:39:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:39:25] Production.INFO: ==12228== Releasing lock...  
[2025-03-18 15:39:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:39:25] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:40:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:40:07
    [end_date_ymd] => 2025-03-18 15:40:07
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:40:07' and `end` < '2025-03-18 15: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-18 15:40:20] Production.INFO: count ==5366  
[2025-03-18 15:40:23] Production.ERROR: pbx CDR StartTime 2025-03-18 12:40:07 - End Time 2025-03-18 15:40:07  
[2025-03-18 15:40:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:40:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709142', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:40:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709142', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:40:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709142', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:40:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709142', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:40:23] Production.INFO: ProcessCDR(1,14709142,1,1,2)  
[2025-03-18 15:40:23] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:40:26] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709142,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:40:26] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:40:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709142,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:40:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709142', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:40:29] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709142', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:40:29] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:40:29] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:40:29] Production.INFO: ==12304== Releasing lock...  
[2025-03-18 15:40:29] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:40:29] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:41:05
    [end_date_ymd] => 2025-03-18 15:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:41:05' and `end` < '2025-03-18 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-18 15:41:18] Production.INFO: count ==5380  
[2025-03-18 15:41:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:41:05 - End Time 2025-03-18 15:41:05  
[2025-03-18 15:41:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709147', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709147', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709147', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709147', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:41:21] Production.INFO: ProcessCDR(1,14709147,1,1,2)  
[2025-03-18 15:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709147,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709147,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709147,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709147,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709147', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709147', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:41:26] Production.INFO: ==12376== Releasing lock...  
[2025-03-18 15:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:41:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:42:06
    [end_date_ymd] => 2025-03-18 15:42:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:42:06' and `end` < '2025-03-18 15: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-18 15:42:19] Production.INFO: count ==5396  
[2025-03-18 15:42:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:42:06 - End Time 2025-03-18 15:42:06  
[2025-03-18 15:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709152', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709152', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709152', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709152', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:42:21] Production.INFO: ProcessCDR(1,14709152,1,1,2)  
[2025-03-18 15:42:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709152,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:42:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709152,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:42:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709152,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:42:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709152,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709152', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:42:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709152', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:42:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:42:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:42:26] Production.INFO: ==12487== Releasing lock...  
[2025-03-18 15:42:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:42:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:43:05
    [end_date_ymd] => 2025-03-18 15:43:05
    [RateCDR] => 1
)
  
[2025-03-18 15:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:43:05' and `end` < '2025-03-18 15:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:43:18] Production.INFO: count ==5388  
[2025-03-18 15:43:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:43:05 - End Time 2025-03-18 15:43:05  
[2025-03-18 15:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709157', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709157', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709157', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709157', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:43:21] Production.INFO: ProcessCDR(1,14709157,1,1,2)  
[2025-03-18 15:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709157,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:43:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709157,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:43:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709157,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709157,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709157', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709157', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:43:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:43:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:43:26] Production.INFO: ==12559== Releasing lock...  
[2025-03-18 15:43:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:43:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:44:06
    [end_date_ymd] => 2025-03-18 15:44:06
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:44:06' and `end` < '2025-03-18 15: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-18 15:44:19] Production.INFO: count ==5388  
[2025-03-18 15:44:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:44:06 - End Time 2025-03-18 15:44:06  
[2025-03-18 15:44:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709162', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709162', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709162', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:44:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709162', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:44:21] Production.INFO: ProcessCDR(1,14709162,1,1,2)  
[2025-03-18 15:44:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:44:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709162,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:44:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:44:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709162,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709162', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709162', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:44:26] Production.INFO: ==12633== Releasing lock...  
[2025-03-18 15:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:44:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:45:05
    [end_date_ymd] => 2025-03-18 15:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:45:05' and `end` < '2025-03-18 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-18 15:45:19] Production.INFO: count ==5388  
[2025-03-18 15:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:45:05 - End Time 2025-03-18 15:45:05  
[2025-03-18 15:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709167', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709167', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709167', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709167', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:45:21] Production.INFO: ProcessCDR(1,14709167,1,1,2)  
[2025-03-18 15:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:45:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709167,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:45:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709167,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709167', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709167', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:45:26] Production.INFO: ==12706== Releasing lock...  
[2025-03-18 15:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:45:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:46:05
    [end_date_ymd] => 2025-03-18 15:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:46:05' and `end` < '2025-03-18 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-18 15:46:19] Production.INFO: count ==5389  
[2025-03-18 15:46:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:46:05 - End Time 2025-03-18 15:46:05  
[2025-03-18 15:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709172', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709172', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709172', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709172', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:46:21] Production.INFO: ProcessCDR(1,14709172,1,1,2)  
[2025-03-18 15:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709172,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709172,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709172', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709172', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:46:26] Production.INFO: ==12784== Releasing lock...  
[2025-03-18 15:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:46:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:47:05
    [end_date_ymd] => 2025-03-18 15:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:47:05' and `end` < '2025-03-18 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-18 15:47:18] Production.INFO: count ==5388  
[2025-03-18 15:47:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:47:05 - End Time 2025-03-18 15:47:05  
[2025-03-18 15:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709177', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709177', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709177', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:47:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709177', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:47:21] Production.INFO: ProcessCDR(1,14709177,1,1,2)  
[2025-03-18 15:47:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709177,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:47:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709177,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709177', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:47:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709177', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:47:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:47:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:47:25] Production.INFO: ==12854== Releasing lock...  
[2025-03-18 15:47:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:47:25] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:48:06
    [end_date_ymd] => 2025-03-18 15:48:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:48:06' and `end` < '2025-03-18 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-18 15:48:19] Production.INFO: count ==5396  
[2025-03-18 15:48:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:48:06 - End Time 2025-03-18 15:48:06  
[2025-03-18 15:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709182', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:48:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709182', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:48:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709182', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:48:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709182', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:48:22] Production.INFO: ProcessCDR(1,14709182,1,1,2)  
[2025-03-18 15:48:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:48:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709182,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:48:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:48:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709182,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:48:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709182', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:48:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709182', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:48:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:48:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:48:27] Production.INFO: ==12927== Releasing lock...  
[2025-03-18 15:48:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:48:27] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:49:05
    [end_date_ymd] => 2025-03-18 15:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:49:05' and `end` < '2025-03-18 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-18 15:49:18] Production.INFO: count ==5389  
[2025-03-18 15:49:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:49:05 - End Time 2025-03-18 15:49:05  
[2025-03-18 15:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709187', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709187', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709187', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709187', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:49:20] Production.INFO: ProcessCDR(1,14709187,1,1,2)  
[2025-03-18 15:49:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709187,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709187,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709187', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709187', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:49:26] Production.INFO: ==13006== Releasing lock...  
[2025-03-18 15:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:49:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 15:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:50:06
    [end_date_ymd] => 2025-03-18 15:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:50:06' and `end` < '2025-03-18 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-18 15:50:20] Production.INFO: count ==5408  
[2025-03-18 15:50:22] Production.ERROR: pbx CDR StartTime 2025-03-18 12:50:06 - End Time 2025-03-18 15:50:06  
[2025-03-18 15:50:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709193', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709193', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709193', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:50:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709193', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:50:22] Production.INFO: ProcessCDR(1,14709193,1,1,2)  
[2025-03-18 15:50:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709193,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709193,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709193', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709193', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:50:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:50:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:50:26] Production.INFO: ==13080== Releasing lock...  
[2025-03-18 15:50:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:50:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 15:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:51:05
    [end_date_ymd] => 2025-03-18 15:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:51:05' and `end` < '2025-03-18 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-18 15:51:18] Production.INFO: count ==5446  
[2025-03-18 15:51:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:51:05 - End Time 2025-03-18 15:51:05  
[2025-03-18 15:51:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709198', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709198', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709198', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709198', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:51:21] Production.INFO: ProcessCDR(1,14709198,1,1,2)  
[2025-03-18 15:51:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709198,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709198,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709198,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:51:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709198,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709198', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709198', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:51:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:51:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:51:26] Production.INFO: ==13155== Releasing lock...  
[2025-03-18 15:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:51:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:52:05
    [end_date_ymd] => 2025-03-18 15:52:05
    [RateCDR] => 1
)
  
[2025-03-18 15:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:52:05' and `end` < '2025-03-18 15:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:52:19] Production.INFO: count ==5450  
[2025-03-18 15:52:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:52:05 - End Time 2025-03-18 15:52:05  
[2025-03-18 15:52:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709203', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709203', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709203', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:52:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709203', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:52:21] Production.INFO: ProcessCDR(1,14709203,1,1,2)  
[2025-03-18 15:52:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709203,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:52:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709203,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:52:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709203,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:52:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709203,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:52:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709203', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:52:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709203', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:52:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:52:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:52:26] Production.INFO: ==13233== Releasing lock...  
[2025-03-18 15:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:52:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:53:05
    [end_date_ymd] => 2025-03-18 15:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:53:05' and `end` < '2025-03-18 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-18 15:53:18] Production.INFO: count ==5446  
[2025-03-18 15:53:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:53:05 - End Time 2025-03-18 15:53:05  
[2025-03-18 15:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709208', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709208', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709208', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709208', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:53:21] Production.INFO: ProcessCDR(1,14709208,1,1,2)  
[2025-03-18 15:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709208,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709208,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709208,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709208,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709208', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709208', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:53:26] Production.INFO: ==13310== Releasing lock...  
[2025-03-18 15:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:53:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:54:05
    [end_date_ymd] => 2025-03-18 15:54:05
    [RateCDR] => 1
)
  
[2025-03-18 15: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-18 12:54:05' and `end` < '2025-03-18 15: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-18 15:54:19] Production.INFO: count ==5446  
[2025-03-18 15:54:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:54:05 - End Time 2025-03-18 15:54:05  
[2025-03-18 15:54:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709213', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709213', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709213', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709213', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:54:21] Production.INFO: ProcessCDR(1,14709213,1,1,2)  
[2025-03-18 15:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709213,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:54:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709213,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:54:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709213,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:54:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709213,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709213', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:54:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709213', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:54:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:54:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:54:27] Production.INFO: ==13383== Releasing lock...  
[2025-03-18 15:54:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:54:27] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:55:05
    [end_date_ymd] => 2025-03-18 15:55:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:55:05' and `end` < '2025-03-18 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-18 15:55:18] Production.INFO: count ==5439  
[2025-03-18 15:55:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:55:05 - End Time 2025-03-18 15:55:05  
[2025-03-18 15:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709218', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709218', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709218', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709218', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:55:21] Production.INFO: ProcessCDR(1,14709218,1,1,2)  
[2025-03-18 15:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:55:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709218,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:55:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:55:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709218,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709218', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709218', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:55:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:55:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:55:26] Production.INFO: ==13457== Releasing lock...  
[2025-03-18 15:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:55:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:56:05
    [end_date_ymd] => 2025-03-18 15:56:05
    [RateCDR] => 1
)
  
[2025-03-18 15:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 12:56:05' and `end` < '2025-03-18 15:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 15:56:19] Production.INFO: count ==5439  
[2025-03-18 15:56:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:56:05 - End Time 2025-03-18 15:56:05  
[2025-03-18 15:56:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709223', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709223', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709223', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:56:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709223', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:56:21] Production.INFO: ProcessCDR(1,14709223,1,1,2)  
[2025-03-18 15:56:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:56:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709223,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:56:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:56:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709223,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709223', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:56:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709223', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:56:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:56:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:56:26] Production.INFO: ==13532== Releasing lock...  
[2025-03-18 15:56:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:56:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:57:05
    [end_date_ymd] => 2025-03-18 15:57:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:57:05' and `end` < '2025-03-18 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-18 15:57:18] Production.INFO: count ==5446  
[2025-03-18 15:57:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:57:05 - End Time 2025-03-18 15:57:05  
[2025-03-18 15:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709228', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709228', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709228', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709228', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:57:21] Production.INFO: ProcessCDR(1,14709228,1,1,2)  
[2025-03-18 15:57:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709228,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:57:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709228,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709228', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709228', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:57:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:57:26] Production.INFO: ==13604== Releasing lock...  
[2025-03-18 15:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:57:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:58:06
    [end_date_ymd] => 2025-03-18 15:58:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:58:06' and `end` < '2025-03-18 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-18 15:58:19] Production.INFO: count ==5435  
[2025-03-18 15:58:21] Production.ERROR: pbx CDR StartTime 2025-03-18 12:58:06 - End Time 2025-03-18 15:58:06  
[2025-03-18 15:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709233', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709233', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709233', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709233', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:58:21] Production.INFO: ProcessCDR(1,14709233,1,1,2)  
[2025-03-18 15:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:58:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709233,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:58:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709233,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709233', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709233', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:58:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:58:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:58:26] Production.INFO: ==13726== Releasing lock...  
[2025-03-18 15:58:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:58:26] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 15:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 12:59:05
    [end_date_ymd] => 2025-03-18 15:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 12:59:05' and `end` < '2025-03-18 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-18 15:59:18] Production.INFO: count ==5436  
[2025-03-18 15:59:20] Production.ERROR: pbx CDR StartTime 2025-03-18 12:59:05 - End Time 2025-03-18 15:59:05  
[2025-03-18 15:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709238', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709238', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709238', 'tblTempVendorCDR_20' ) start  
[2025-03-18 15:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709238', 'tblTempVendorCDR_20' ) end  
[2025-03-18 15:59:20] Production.INFO: ProcessCDR(1,14709238,1,1,2)  
[2025-03-18 15:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:59:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709238,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 15:59:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709238,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 15:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709238', 'tblTempUsageDetail_20' ) start  
[2025-03-18 15:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709238', 'tblTempUsageDetail_20' ) end  
[2025-03-18 15:59:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 15:59:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 15:59:24] Production.INFO: ==13808== Releasing lock...  
[2025-03-18 15:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 15:59:24] Production.INFO: 68.75 MB  #Memory Used#   
[2025-03-18 16:00:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:00:07
    [end_date_ymd] => 2025-03-18 16:00:07
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:00:07' and `end` < '2025-03-18 16: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-18 16:00:20] Production.INFO: count ==5426  
[2025-03-18 16:00:22] Production.ERROR: pbx CDR StartTime 2025-03-18 13:00:07 - End Time 2025-03-18 16:00:07  
[2025-03-18 16:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709244', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709244', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709244', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709244', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:00:22] Production.INFO: ProcessCDR(1,14709244,1,1,2)  
[2025-03-18 16:00:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709244,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:00:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709244,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:00:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709244,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:00:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709244,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709244', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709244', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:00:27] Production.INFO: ==13887== Releasing lock...  
[2025-03-18 16:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:00:28] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 16:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:01:05
    [end_date_ymd] => 2025-03-18 16:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:01:05' and `end` < '2025-03-18 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-18 16:01:18] Production.INFO: count ==5415  
[2025-03-18 16:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:01:05 - End Time 2025-03-18 16:01:05  
[2025-03-18 16:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709249', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709249', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709249', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709249', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:01:21] Production.INFO: ProcessCDR(1,14709249,1,1,2)  
[2025-03-18 16:01:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709249,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:01:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709249,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:01:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709249,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:01:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709249,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709249', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:01:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709249', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:01:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:01:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:01:26] Production.INFO: ==13980== Releasing lock...  
[2025-03-18 16:01:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:01:26] Production.INFO: 68.5 MB  #Memory Used#   
[2025-03-18 16:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:02:06
    [end_date_ymd] => 2025-03-18 16:02:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:02:06' and `end` < '2025-03-18 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-18 16:02:19] Production.INFO: count ==5371  
[2025-03-18 16:02:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:02:06 - End Time 2025-03-18 16:02:06  
[2025-03-18 16:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709254', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709254', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709254', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709254', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:02:21] Production.INFO: ProcessCDR(1,14709254,1,1,2)  
[2025-03-18 16:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:02:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709254,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:02:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709254,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709254', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709254', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:02:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:02:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:02:26] Production.INFO: ==14053== Releasing lock...  
[2025-03-18 16:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:02:26] Production.INFO: 68.25 MB  #Memory Used#   
[2025-03-18 16:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:03:05
    [end_date_ymd] => 2025-03-18 16:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:03:05' and `end` < '2025-03-18 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-18 16:03:18] Production.INFO: count ==5328  
[2025-03-18 16:03:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:03:05 - End Time 2025-03-18 16:03:05  
[2025-03-18 16:03:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709259', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709259', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709259', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709259', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:03:21] Production.INFO: ProcessCDR(1,14709259,1,1,2)  
[2025-03-18 16:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709259,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:03:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709259,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:03:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709259,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:03:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709259,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709259', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709259', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:03:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:03:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:03:26] Production.INFO: ==14125== Releasing lock...  
[2025-03-18 16:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:03:26] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 16:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:04:05
    [end_date_ymd] => 2025-03-18 16:04:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:04:05' and `end` < '2025-03-18 16: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-18 16:04:19] Production.INFO: count ==5302  
[2025-03-18 16:04:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:04:05 - End Time 2025-03-18 16:04:05  
[2025-03-18 16:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709264', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709264', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709264', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709264', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:04:21] Production.INFO: ProcessCDR(1,14709264,1,1,2)  
[2025-03-18 16:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709264,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709264,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709264,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709264,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709264', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709264', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:04:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:04:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:04:26] Production.INFO: ==14201== Releasing lock...  
[2025-03-18 16:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:04:26] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 16:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:05:05
    [end_date_ymd] => 2025-03-18 16:05:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:05:05' and `end` < '2025-03-18 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-18 16:05:19] Production.INFO: count ==5276  
[2025-03-18 16:05:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:05:05 - End Time 2025-03-18 16:05:05  
[2025-03-18 16:05:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709269', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709269', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709269', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:05:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709269', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:05:21] Production.INFO: ProcessCDR(1,14709269,1,1,2)  
[2025-03-18 16:05:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709269,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:05:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709269,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709269', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709269', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:05:25] Production.INFO: ==14278== Releasing lock...  
[2025-03-18 16:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:05:25] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:06:05
    [end_date_ymd] => 2025-03-18 16:06:05
    [RateCDR] => 1
)
  
[2025-03-18 16:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:06:05' and `end` < '2025-03-18 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-18 16:06:19] Production.INFO: count ==5273  
[2025-03-18 16:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:06:05 - End Time 2025-03-18 16:06:05  
[2025-03-18 16:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709274', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709274', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709274', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709274', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:06:21] Production.INFO: ProcessCDR(1,14709274,1,1,2)  
[2025-03-18 16:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:06:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709274,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:06:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709274,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709274', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709274', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:06:26] Production.INFO: ==14358== Releasing lock...  
[2025-03-18 16:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:06:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:07:05
    [end_date_ymd] => 2025-03-18 16:07:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:07:05' and `end` < '2025-03-18 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-18 16:07:19] Production.INFO: count ==5281  
[2025-03-18 16:07:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:07:05 - End Time 2025-03-18 16:07:05  
[2025-03-18 16:07:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709279', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709279', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709279', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709279', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:07:21] Production.INFO: ProcessCDR(1,14709279,1,1,2)  
[2025-03-18 16:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709279,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:07:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709279,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709279', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709279', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:07:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:07:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:07:26] Production.INFO: ==14436== Releasing lock...  
[2025-03-18 16:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:07:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:08:05
    [end_date_ymd] => 2025-03-18 16:08:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:08:05' and `end` < '2025-03-18 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-18 16:08:18] Production.INFO: count ==5262  
[2025-03-18 16:08:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:08:05 - End Time 2025-03-18 16:08:05  
[2025-03-18 16:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709284', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709284', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709284', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709284', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:08:21] Production.INFO: ProcessCDR(1,14709284,1,1,2)  
[2025-03-18 16:08:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709284,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:08:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709284,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709284', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709284', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:08:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:08:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:08:26] Production.INFO: ==14512== Releasing lock...  
[2025-03-18 16:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:08:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:09:05
    [end_date_ymd] => 2025-03-18 16:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:09:05' and `end` < '2025-03-18 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-18 16:09:19] Production.INFO: count ==5221  
[2025-03-18 16:09:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:09:05 - End Time 2025-03-18 16:09:05  
[2025-03-18 16:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709289', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709289', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709289', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709289', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:09:21] Production.INFO: ProcessCDR(1,14709289,1,1,2)  
[2025-03-18 16:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709289,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:09:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709289,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709289', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709289', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:09:26] Production.INFO: ==14594== Releasing lock...  
[2025-03-18 16:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:09:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 16:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:10:06
    [end_date_ymd] => 2025-03-18 16:10:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:10:06' and `end` < '2025-03-18 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-18 16:10:19] Production.INFO: count ==5220  
[2025-03-18 16:10:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:10:06 - End Time 2025-03-18 16:10:06  
[2025-03-18 16:10:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709295', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709295', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709295', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709295', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:10:21] Production.INFO: ProcessCDR(1,14709295,1,1,2)  
[2025-03-18 16:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709295,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:10:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709295,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:10:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709295,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:10:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709295,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:10:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709295', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709295', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:10:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:10:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:10:27] Production.INFO: ==14673== Releasing lock...  
[2025-03-18 16:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:10:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 16:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:11:06
    [end_date_ymd] => 2025-03-18 16:11:06
    [RateCDR] => 1
)
  
[2025-03-18 16:11:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:11:06' and `end` < '2025-03-18 16:11:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:11:19] Production.INFO: count ==5240  
[2025-03-18 16:11:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:11:06 - End Time 2025-03-18 16:11:06  
[2025-03-18 16:11:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709300', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709300', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709300', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:11:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709300', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:11:21] Production.INFO: ProcessCDR(1,14709300,1,1,2)  
[2025-03-18 16:11:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709300,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:11:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709300,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:11:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709300,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:11:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709300,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:11:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709300', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:11:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709300', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:11:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:11:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:11:27] Production.INFO: ==14753== Releasing lock...  
[2025-03-18 16:11:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:11:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:12:05
    [end_date_ymd] => 2025-03-18 16:12:05
    [RateCDR] => 1
)
  
[2025-03-18 16:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:12:05' and `end` < '2025-03-18 16:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:12:19] Production.INFO: count ==5243  
[2025-03-18 16:12:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:12:05 - End Time 2025-03-18 16:12:05  
[2025-03-18 16:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709305', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709305', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709305', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709305', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:12:21] Production.INFO: ProcessCDR(1,14709305,1,1,2)  
[2025-03-18 16:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709305,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:12:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709305,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:12:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709305,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709305,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709305', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709305', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:12:26] Production.INFO: ==14827== Releasing lock...  
[2025-03-18 16:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:12:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:13:05
    [end_date_ymd] => 2025-03-18 16:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:13:05' and `end` < '2025-03-18 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-18 16:13:19] Production.INFO: count ==5251  
[2025-03-18 16:13:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:13:05 - End Time 2025-03-18 16:13:05  
[2025-03-18 16:13:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709310', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709310', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709310', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:13:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709310', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:13:21] Production.INFO: ProcessCDR(1,14709310,1,1,2)  
[2025-03-18 16:13:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709310,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:13:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709310,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:13:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709310,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:13:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709310,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709310', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:13:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709310', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:13:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:13:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:13:26] Production.INFO: ==14940== Releasing lock...  
[2025-03-18 16:13:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:13:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:14:05
    [end_date_ymd] => 2025-03-18 16:14:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:14:05' and `end` < '2025-03-18 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-18 16:14:18] Production.INFO: count ==5250  
[2025-03-18 16:14:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:14:05 - End Time 2025-03-18 16:14:05  
[2025-03-18 16:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709315', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709315', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709315', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709315', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:14:21] Production.INFO: ProcessCDR(1,14709315,1,1,2)  
[2025-03-18 16:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709315,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:14:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709315,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:14:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709315,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709315,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709315', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709315', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:14:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:14:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:14:26] Production.INFO: ==15016== Releasing lock...  
[2025-03-18 16:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:14:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:15:06
    [end_date_ymd] => 2025-03-18 16:15:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:15:06' and `end` < '2025-03-18 16: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-18 16:15:19] Production.INFO: count ==5244  
[2025-03-18 16:15:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:15:06 - End Time 2025-03-18 16:15:06  
[2025-03-18 16:15:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709320', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709320', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709320', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:15:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709320', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:15:21] Production.INFO: ProcessCDR(1,14709320,1,1,2)  
[2025-03-18 16:15:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:15:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709320,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:15:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:15:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709320,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:15:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709320', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:15:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709320', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:15:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:15:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:15:27] Production.INFO: ==15093== Releasing lock...  
[2025-03-18 16:15:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:15:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:16:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:16:04
    [end_date_ymd] => 2025-03-18 16:16:04
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:16:04' and `end` < '2025-03-18 16: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-18 16:16:18] Production.INFO: count ==5238  
[2025-03-18 16:16:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:16:04 - End Time 2025-03-18 16:16:04  
[2025-03-18 16:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709325', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709325', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709325', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709325', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:16:20] Production.INFO: ProcessCDR(1,14709325,1,1,2)  
[2025-03-18 16:16:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709325,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:16:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709325,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709325', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:16:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709325', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:16:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:16:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:16:26] Production.INFO: ==15169== Releasing lock...  
[2025-03-18 16:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:16:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:17:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:17:06
    [end_date_ymd] => 2025-03-18 16:17:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:17:06' and `end` < '2025-03-18 16: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-18 16:17:19] Production.INFO: count ==5209  
[2025-03-18 16:17:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:17:06 - End Time 2025-03-18 16:17:06  
[2025-03-18 16:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709330', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709330', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709330', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709330', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:17:21] Production.INFO: ProcessCDR(1,14709330,1,1,2)  
[2025-03-18 16:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:17:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709330,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:17:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:17:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709330,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709330', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:17:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709330', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:17:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:17:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:17:27] Production.INFO: ==15245== Releasing lock...  
[2025-03-18 16:17:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:17:27] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 16:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:18:05
    [end_date_ymd] => 2025-03-18 16:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:18:05' and `end` < '2025-03-18 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-18 16:18:18] Production.INFO: count ==5204  
[2025-03-18 16:18:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:18:05 - End Time 2025-03-18 16:18:05  
[2025-03-18 16:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709335', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709335', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709335', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709335', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:18:20] Production.INFO: ProcessCDR(1,14709335,1,1,2)  
[2025-03-18 16:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709335,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709335,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709335', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709335', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:18:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:18:25] Production.INFO: ==15321== Releasing lock...  
[2025-03-18 16:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:18:25] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 16:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:19:06
    [end_date_ymd] => 2025-03-18 16:19:06
    [RateCDR] => 1
)
  
[2025-03-18 16:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:19:06' and `end` < '2025-03-18 16:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:19:19] Production.INFO: count ==5181  
[2025-03-18 16:19:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:19:06 - End Time 2025-03-18 16:19:06  
[2025-03-18 16:19:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709340', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709340', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709340', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709340', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:19:21] Production.INFO: ProcessCDR(1,14709340,1,1,2)  
[2025-03-18 16:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:19:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709340,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:19:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:19:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709340,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709340', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709340', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:19:26] Production.INFO: ==15397== Releasing lock...  
[2025-03-18 16:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:19:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:20:06
    [end_date_ymd] => 2025-03-18 16:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:20:06' and `end` < '2025-03-18 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-18 16:20:20] Production.INFO: count ==5173  
[2025-03-18 16:20:22] Production.ERROR: pbx CDR StartTime 2025-03-18 13:20:06 - End Time 2025-03-18 16:20:06  
[2025-03-18 16:20:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709345', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709345', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709345', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:20:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709345', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:20:22] Production.INFO: ProcessCDR(1,14709345,1,1,2)  
[2025-03-18 16:20:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:20:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709345,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:20:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:20:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709345,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:20:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709345', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:20:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709345', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:20:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:20:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:20:28] Production.INFO: ==15472== Releasing lock...  
[2025-03-18 16:20:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:20:28] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:21:06
    [end_date_ymd] => 2025-03-18 16:21:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:21:06' and `end` < '2025-03-18 16: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-18 16:21:19] Production.INFO: count ==5168  
[2025-03-18 16:21:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:21:06 - End Time 2025-03-18 16:21:06  
[2025-03-18 16:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709351', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:21:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709351', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:21:22] Production.INFO: ProcessCDR(1,14709351,1,1,2)  
[2025-03-18 16:21:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:21:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709351,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:21:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:21:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709351,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:21:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709351', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:21:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709351', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:21:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:21:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:21:27] Production.INFO: ==15547== Releasing lock...  
[2025-03-18 16:21:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:21:27] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:22:06
    [end_date_ymd] => 2025-03-18 16:22:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:22:06' and `end` < '2025-03-18 16: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-18 16:22:19] Production.INFO: count ==5147  
[2025-03-18 16:22:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:22:06 - End Time 2025-03-18 16:22:06  
[2025-03-18 16:22:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709356', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709356', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709356', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709356', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:22:21] Production.INFO: ProcessCDR(1,14709356,1,1,2)  
[2025-03-18 16:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:22:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709356,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:22:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:22:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709356,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709356', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:22:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709356', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:22:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:22:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:22:25] Production.INFO: ==15617== Releasing lock...  
[2025-03-18 16:22:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:22:25] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 16:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:23:05
    [end_date_ymd] => 2025-03-18 16:23:05
    [RateCDR] => 1
)
  
[2025-03-18 16:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:23:05' and `end` < '2025-03-18 16:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:23:18] Production.INFO: count ==5157  
[2025-03-18 16:23:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:23:05 - End Time 2025-03-18 16:23:05  
[2025-03-18 16:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709361', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709361', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709361', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709361', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:23:21] Production.INFO: ProcessCDR(1,14709361,1,1,2)  
[2025-03-18 16:23:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709361,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:23:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709361,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709361', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709361', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:23:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:23:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:23:27] Production.INFO: ==15687== Releasing lock...  
[2025-03-18 16:23:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:23:27] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 16:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:24:05
    [end_date_ymd] => 2025-03-18 16:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:24:05' and `end` < '2025-03-18 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-18 16:24:19] Production.INFO: count ==5159  
[2025-03-18 16:24:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:24:05 - End Time 2025-03-18 16:24:05  
[2025-03-18 16:24:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709366', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709366', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:24:21] Production.INFO: ProcessCDR(1,14709366,1,1,2)  
[2025-03-18 16:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:24:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709366,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:24:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:24:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709366,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:24:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709366', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:24:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709366', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:24:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:24:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:24:28] Production.INFO: ==15758== Releasing lock...  
[2025-03-18 16:24:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:24:28] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 16:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:25:05
    [end_date_ymd] => 2025-03-18 16:25:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:25:05' and `end` < '2025-03-18 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-18 16:25:19] Production.INFO: count ==5153  
[2025-03-18 16:25:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:25:05 - End Time 2025-03-18 16:25:05  
[2025-03-18 16:25:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709371', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709371', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:25:21] Production.INFO: ProcessCDR(1,14709371,1,1,2)  
[2025-03-18 16:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:25:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709371,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:25:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:25:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709371,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:25:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709371', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:25:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709371', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:25:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:25:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:25:27] Production.INFO: ==15829== Releasing lock...  
[2025-03-18 16:25:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:25:27] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 16:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:26:06
    [end_date_ymd] => 2025-03-18 16:26:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:26:06' and `end` < '2025-03-18 16: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-18 16:26:19] Production.INFO: count ==5147  
[2025-03-18 16:26:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:26:06 - End Time 2025-03-18 16:26:06  
[2025-03-18 16:26:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709376', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709376', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709376', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:26:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709376', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:26:21] Production.INFO: ProcessCDR(1,14709376,1,1,2)  
[2025-03-18 16:26:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:26:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709376,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:26:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:26:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709376,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709376', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:26:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709376', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:26:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:26:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:26:26] Production.INFO: ==15904== Releasing lock...  
[2025-03-18 16:26:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:26:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 16:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:27:05
    [end_date_ymd] => 2025-03-18 16:27:05
    [RateCDR] => 1
)
  
[2025-03-18 16:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:27:05' and `end` < '2025-03-18 16:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:27:18] Production.INFO: count ==5164  
[2025-03-18 16:27:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:27:05 - End Time 2025-03-18 16:27:05  
[2025-03-18 16:27:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709381', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709381', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709381', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709381', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:27:21] Production.INFO: ProcessCDR(1,14709381,1,1,2)  
[2025-03-18 16:27:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:27:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709381,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:27:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:27:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709381,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709381', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709381', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:27:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:27:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:27:26] Production.INFO: ==15976== Releasing lock...  
[2025-03-18 16:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:27:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:28:05
    [end_date_ymd] => 2025-03-18 16:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:28:05' and `end` < '2025-03-18 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-18 16:28:19] Production.INFO: count ==5177  
[2025-03-18 16:28:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:28:05 - End Time 2025-03-18 16:28:05  
[2025-03-18 16:28:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709386', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709386', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709386', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:28:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709386', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:28:21] Production.INFO: ProcessCDR(1,14709386,1,1,2)  
[2025-03-18 16:28:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709386,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:28:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709386,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709386', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709386', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:28:26] Production.INFO: ==16051== Releasing lock...  
[2025-03-18 16:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:28:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:29:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:29:04
    [end_date_ymd] => 2025-03-18 16:29:04
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:29:04' and `end` < '2025-03-18 16: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-18 16:29:18] Production.INFO: count ==5169  
[2025-03-18 16:29:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:29:04 - End Time 2025-03-18 16:29:04  
[2025-03-18 16:29:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709391', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709391', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709391', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709391', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:29:20] Production.INFO: ProcessCDR(1,14709391,1,1,2)  
[2025-03-18 16:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709391,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709391,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709391', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709391', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:29:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:29:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:29:25] Production.INFO: ==16162== Releasing lock...  
[2025-03-18 16:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:29:25] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:30:06
    [end_date_ymd] => 2025-03-18 16:30:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:30:06' and `end` < '2025-03-18 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-18 16:30:20] Production.INFO: count ==5187  
[2025-03-18 16:30:22] Production.ERROR: pbx CDR StartTime 2025-03-18 13:30:06 - End Time 2025-03-18 16:30:06  
[2025-03-18 16:30:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709397', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:30:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709397', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:30:22] Production.INFO: ProcessCDR(1,14709397,1,1,2)  
[2025-03-18 16:30:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:30:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709397,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:30:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:30:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709397,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709397', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:30:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709397', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:30:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:30:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:30:27] Production.INFO: ==16237== Releasing lock...  
[2025-03-18 16:30:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:30:27] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 16:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:31:06
    [end_date_ymd] => 2025-03-18 16:31:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:31:06' and `end` < '2025-03-18 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-18 16:31:19] Production.INFO: count ==5236  
[2025-03-18 16:31:22] Production.ERROR: pbx CDR StartTime 2025-03-18 13:31:06 - End Time 2025-03-18 16:31:06  
[2025-03-18 16:31:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709402', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:31:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709402', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:31:22] Production.INFO: ProcessCDR(1,14709402,1,1,2)  
[2025-03-18 16:31:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:31:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709402,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:31:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:31:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709402,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:31:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709402', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:31:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709402', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:31:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:31:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:31:27] Production.INFO: ==16312== Releasing lock...  
[2025-03-18 16:31:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:31:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:32:05
    [end_date_ymd] => 2025-03-18 16:32:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:32:05' and `end` < '2025-03-18 16: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-18 16:32:19] Production.INFO: count ==5278  
[2025-03-18 16:32:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:32:05 - End Time 2025-03-18 16:32:05  
[2025-03-18 16:32:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709407', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709407', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:32:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709407', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:32:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709407', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:32:22] Production.INFO: ProcessCDR(1,14709407,1,1,2)  
[2025-03-18 16:32:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:32:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709407,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:32:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:32:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709407,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:32:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709407', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:32:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709407', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:32:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:32:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:32:27] Production.INFO: ==16385== Releasing lock...  
[2025-03-18 16:32:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:32:27] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:33:05
    [end_date_ymd] => 2025-03-18 16:33:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:33:05' and `end` < '2025-03-18 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-18 16:33:19] Production.INFO: count ==5271  
[2025-03-18 16:33:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:33:05 - End Time 2025-03-18 16:33:05  
[2025-03-18 16:33:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709412', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709412', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709412', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709412', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:33:21] Production.INFO: ProcessCDR(1,14709412,1,1,2)  
[2025-03-18 16:33:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:33:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709412,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:33:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:33:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709412,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709412', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709412', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:33:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:33:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:33:26] Production.INFO: ==16459== Releasing lock...  
[2025-03-18 16:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:33:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:34:05
    [end_date_ymd] => 2025-03-18 16:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:34:05' and `end` < '2025-03-18 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-18 16:34:19] Production.INFO: count ==5250  
[2025-03-18 16:34:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:34:05 - End Time 2025-03-18 16:34:05  
[2025-03-18 16:34:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709417', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:34:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709417', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:34:21] Production.INFO: ProcessCDR(1,14709417,1,1,2)  
[2025-03-18 16:34:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709417,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:34:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709417,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709417', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:34:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709417', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:34:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:34:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:34:26] Production.INFO: ==16533== Releasing lock...  
[2025-03-18 16:34:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:34:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:35:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:35:06
    [end_date_ymd] => 2025-03-18 16:35:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:35:06' and `end` < '2025-03-18 16: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-18 16:35:19] Production.INFO: count ==5263  
[2025-03-18 16:35:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:35:06 - End Time 2025-03-18 16:35:06  
[2025-03-18 16:35:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709422', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709422', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:35:21] Production.INFO: ProcessCDR(1,14709422,1,1,2)  
[2025-03-18 16:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:35:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709422,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:35:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:35:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709422,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709422', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:35:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709422', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:35:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:35:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:35:27] Production.INFO: ==16603== Releasing lock...  
[2025-03-18 16:35:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:35:27] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:36:05
    [end_date_ymd] => 2025-03-18 16:36:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:36:05' and `end` < '2025-03-18 16: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-18 16:36:18] Production.INFO: count ==5244  
[2025-03-18 16:36:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:36:05 - End Time 2025-03-18 16:36:05  
[2025-03-18 16:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709427', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709427', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709427', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:36:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709427', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:36:21] Production.INFO: ProcessCDR(1,14709427,1,1,2)  
[2025-03-18 16:36:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709427,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:36:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709427,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709427', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:36:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709427', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:36:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:36:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:36:26] Production.INFO: ==16676== Releasing lock...  
[2025-03-18 16:36:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:36:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:37:06
    [end_date_ymd] => 2025-03-18 16:37:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:37:06' and `end` < '2025-03-18 16: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-18 16:37:19] Production.INFO: count ==5226  
[2025-03-18 16:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:37:06 - End Time 2025-03-18 16:37:06  
[2025-03-18 16:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709432', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709432', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709432', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709432', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:37:21] Production.INFO: ProcessCDR(1,14709432,1,1,2)  
[2025-03-18 16:37:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:37:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709432,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:37:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:37:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709432,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709432', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709432', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:37:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:37:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:37:26] Production.INFO: ==16748== Releasing lock...  
[2025-03-18 16:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:37:26] Production.INFO: 67 MB  #Memory Used#   
[2025-03-18 16:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:38:05
    [end_date_ymd] => 2025-03-18 16:38:05
    [RateCDR] => 1
)
  
[2025-03-18 16:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:38:05' and `end` < '2025-03-18 16:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:38:19] Production.INFO: count ==5237  
[2025-03-18 16:38:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:38:05 - End Time 2025-03-18 16:38:05  
[2025-03-18 16:38:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709437', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709437', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709437', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:38:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709437', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:38:21] Production.INFO: ProcessCDR(1,14709437,1,1,2)  
[2025-03-18 16:38:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:38:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709437,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:38:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:38:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709437,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:38:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709437', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:38:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709437', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:38:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:38:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:38:27] Production.INFO: ==16819== Releasing lock...  
[2025-03-18 16:38:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:38:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:39:05
    [end_date_ymd] => 2025-03-18 16:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:39:05' and `end` < '2025-03-18 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-18 16:39:19] Production.INFO: count ==5261  
[2025-03-18 16:39:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:39:05 - End Time 2025-03-18 16:39:05  
[2025-03-18 16:39:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709442', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709442', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709442', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:39:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709442', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:39:21] Production.INFO: ProcessCDR(1,14709442,1,1,2)  
[2025-03-18 16:39:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:39:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709442,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:39:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:39:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709442,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709442', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:39:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709442', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:39:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:39:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:39:26] Production.INFO: ==16893== Releasing lock...  
[2025-03-18 16:39:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:39:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:40:05
    [end_date_ymd] => 2025-03-18 16:40:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:40:05' and `end` < '2025-03-18 16: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-18 16:40:19] Production.INFO: count ==5273  
[2025-03-18 16:40:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:40:05 - End Time 2025-03-18 16:40:05  
[2025-03-18 16:40:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709447', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709447', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709447', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:40:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709447', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:40:21] Production.INFO: ProcessCDR(1,14709447,1,1,2)  
[2025-03-18 16:40:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:40:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709447,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:40:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:40:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709447,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709447', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:40:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709447', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:40:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:40:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:40:26] Production.INFO: ==16968== Releasing lock...  
[2025-03-18 16:40:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:40:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:41:06
    [end_date_ymd] => 2025-03-18 16:41:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:41:06' and `end` < '2025-03-18 16: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-18 16:41:19] Production.INFO: count ==5309  
[2025-03-18 16:41:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:41:06 - End Time 2025-03-18 16:41:06  
[2025-03-18 16:41:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709453', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:41:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709453', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:41:21] Production.INFO: ProcessCDR(1,14709453,1,1,2)  
[2025-03-18 16:41:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:41:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709453,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:41:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:41:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709453,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709453', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709453', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:41:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:41:27] Production.INFO: ==17042== Releasing lock...  
[2025-03-18 16:41:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:41:27] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 16:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:42:05
    [end_date_ymd] => 2025-03-18 16:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:42:05' and `end` < '2025-03-18 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-18 16:42:19] Production.INFO: count ==5331  
[2025-03-18 16:42:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:42:05 - End Time 2025-03-18 16:42:05  
[2025-03-18 16:42:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:42:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709458', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:42:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709458', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:42:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709458', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:42:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709458', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:42:22] Production.INFO: ProcessCDR(1,14709458,1,1,2)  
[2025-03-18 16:42:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:42:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709458,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:42:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:42:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709458,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:42:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709458', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:42:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709458', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:42:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:42:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:42:28] Production.INFO: ==17114== Releasing lock...  
[2025-03-18 16:42:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:42:28] Production.INFO: 68 MB  #Memory Used#   
[2025-03-18 16:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:43:06
    [end_date_ymd] => 2025-03-18 16:43:06
    [RateCDR] => 1
)
  
[2025-03-18 16:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:43:06' and `end` < '2025-03-18 16:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:43:19] Production.INFO: count ==5319  
[2025-03-18 16:43:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:43:06 - End Time 2025-03-18 16:43:06  
[2025-03-18 16:43:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709463', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709463', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709463', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:43:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709463', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:43:21] Production.INFO: ProcessCDR(1,14709463,1,1,2)  
[2025-03-18 16:43:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:43:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709463,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:43:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:43:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709463,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:43:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709463', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:43:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709463', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:43:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:43:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:43:27] Production.INFO: ==17187== Releasing lock...  
[2025-03-18 16:43:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:43:27] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 16:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:44:05
    [end_date_ymd] => 2025-03-18 16:44:05
    [RateCDR] => 1
)
  
[2025-03-18 16:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:44:05' and `end` < '2025-03-18 16:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:44:18] Production.INFO: count ==5272  
[2025-03-18 16:44:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:44:05 - End Time 2025-03-18 16:44:05  
[2025-03-18 16:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709468', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709468', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709468', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709468', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:44:20] Production.INFO: ProcessCDR(1,14709468,1,1,2)  
[2025-03-18 16:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709468,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709468,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709468', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:44:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709468', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:44:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:44:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:44:26] Production.INFO: ==17296== Releasing lock...  
[2025-03-18 16:44:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:44:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:45:05
    [end_date_ymd] => 2025-03-18 16:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:45:05' and `end` < '2025-03-18 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-18 16:45:19] Production.INFO: count ==5249  
[2025-03-18 16:45:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:45:05 - End Time 2025-03-18 16:45:05  
[2025-03-18 16:45:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709473', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:45:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709473', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:45:21] Production.INFO: ProcessCDR(1,14709473,1,1,2)  
[2025-03-18 16:45:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:45:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709473,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:45:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:45:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709473,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709473', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709473', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:45:26] Production.INFO: ==17370== Releasing lock...  
[2025-03-18 16:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:45:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:46:05
    [end_date_ymd] => 2025-03-18 16:46:05
    [RateCDR] => 1
)
  
[2025-03-18 16:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:46:05' and `end` < '2025-03-18 16:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:46:19] Production.INFO: count ==5264  
[2025-03-18 16:46:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:46:05 - End Time 2025-03-18 16:46:05  
[2025-03-18 16:46:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709478', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709478', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709478', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:46:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709478', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:46:21] Production.INFO: ProcessCDR(1,14709478,1,1,2)  
[2025-03-18 16:46:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:46:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709478,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:46:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:46:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709478,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709478', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:46:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709478', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:46:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:46:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:46:26] Production.INFO: ==17441== Releasing lock...  
[2025-03-18 16:46:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:46:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:47:05
    [end_date_ymd] => 2025-03-18 16:47:05
    [RateCDR] => 1
)
  
[2025-03-18 16:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:47:05' and `end` < '2025-03-18 16:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:47:20] Production.INFO: count ==5266  
[2025-03-18 16:47:22] Production.ERROR: pbx CDR StartTime 2025-03-18 13:47:05 - End Time 2025-03-18 16:47:05  
[2025-03-18 16:47:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:47:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709483', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:47:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709483', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:47:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709483', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:47:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709483', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:47:22] Production.INFO: ProcessCDR(1,14709483,1,1,2)  
[2025-03-18 16:47:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:47:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709483,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:47:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:47:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709483,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:47:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709483', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:47:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709483', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:47:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:47:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:47:27] Production.INFO: ==17521== Releasing lock...  
[2025-03-18 16:47:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:47:27] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:48:05
    [end_date_ymd] => 2025-03-18 16:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:48:05' and `end` < '2025-03-18 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-18 16:48:18] Production.INFO: count ==5247  
[2025-03-18 16:48:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:48:05 - End Time 2025-03-18 16:48:05  
[2025-03-18 16:48:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709488', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709488', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:48:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709488', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709488', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:48:21] Production.INFO: ProcessCDR(1,14709488,1,1,2)  
[2025-03-18 16:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:48:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709488,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:48:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:48:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709488,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709488', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:48:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709488', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:48:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:48:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:48:26] Production.INFO: ==17599== Releasing lock...  
[2025-03-18 16:48:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:48:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:49:05
    [end_date_ymd] => 2025-03-18 16:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:49:05' and `end` < '2025-03-18 16:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:49:19] Production.INFO: count ==5229  
[2025-03-18 16:49:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:49:05 - End Time 2025-03-18 16:49:05  
[2025-03-18 16:49:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709493', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709493', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709493', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:49:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709493', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:49:21] Production.INFO: ProcessCDR(1,14709493,1,1,2)  
[2025-03-18 16:49:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:49:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709493,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:49:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:49:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709493,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709493', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:49:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709493', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:49:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:49:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:49:26] Production.INFO: ==17679== Releasing lock...  
[2025-03-18 16:49:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:49:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:50:06
    [end_date_ymd] => 2025-03-18 16:50:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:50:06' and `end` < '2025-03-18 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-18 16:50:19] Production.INFO: count ==5248  
[2025-03-18 16:50:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:50:06 - End Time 2025-03-18 16:50:06  
[2025-03-18 16:50:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709499', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709499', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709499', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:50:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709499', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:50:21] Production.INFO: ProcessCDR(1,14709499,1,1,2)  
[2025-03-18 16:50:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709499,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:50:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709499,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:50:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709499,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:50:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709499,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:50:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709499', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:50:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709499', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:50:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:50:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:50:27] Production.INFO: ==17756== Releasing lock...  
[2025-03-18 16:50:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:50:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:51:05
    [end_date_ymd] => 2025-03-18 16:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:51:05' and `end` < '2025-03-18 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-18 16:51:18] Production.INFO: count ==5244  
[2025-03-18 16:51:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:51:05 - End Time 2025-03-18 16:51:05  
[2025-03-18 16:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709504', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:51:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709504', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:51:21] Production.INFO: ProcessCDR(1,14709504,1,1,2)  
[2025-03-18 16:51:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:51:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709504,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:51:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:51:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709504,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709504', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:51:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709504', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:51:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:51:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:51:26] Production.INFO: ==17829== Releasing lock...  
[2025-03-18 16:51:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:51:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:52:05
    [end_date_ymd] => 2025-03-18 16:52:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:52:05' and `end` < '2025-03-18 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-18 16:52:18] Production.INFO: count ==5263  
[2025-03-18 16:52:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:52:05 - End Time 2025-03-18 16:52:05  
[2025-03-18 16:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709509', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709509', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709509', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709509', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:52:20] Production.INFO: ProcessCDR(1,14709509,1,1,2)  
[2025-03-18 16:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709509,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709509,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709509', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:52:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709509', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:52:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:52:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:52:26] Production.INFO: ==17900== Releasing lock...  
[2025-03-18 16:52:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:52:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:53:05
    [end_date_ymd] => 2025-03-18 16:53:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:53:05' and `end` < '2025-03-18 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-18 16:53:19] Production.INFO: count ==5271  
[2025-03-18 16:53:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:53:05 - End Time 2025-03-18 16:53:05  
[2025-03-18 16:53:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709514', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709514', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709514', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:53:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709514', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:53:21] Production.INFO: ProcessCDR(1,14709514,1,1,2)  
[2025-03-18 16:53:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:53:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709514,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:53:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:53:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709514,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709514', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:53:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709514', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:53:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:53:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:53:26] Production.INFO: ==17974== Releasing lock...  
[2025-03-18 16:53:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:53:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:54:05
    [end_date_ymd] => 2025-03-18 16:54:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 13:54:05' and `end` < '2025-03-18 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-18 16:54:18] Production.INFO: count ==5273  
[2025-03-18 16:54:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:54:05 - End Time 2025-03-18 16:54:05  
[2025-03-18 16:54:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709519', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709519', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:54:21] Production.INFO: ProcessCDR(1,14709519,1,1,2)  
[2025-03-18 16:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709519,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:54:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709519,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709519', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:54:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709519', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:54:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:54:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:54:26] Production.INFO: ==18045== Releasing lock...  
[2025-03-18 16:54:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:54:26] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 16:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:55:05
    [end_date_ymd] => 2025-03-18 16:55:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:55:05' and `end` < '2025-03-18 16: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-18 16:55:19] Production.INFO: count ==5252  
[2025-03-18 16:55:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:55:05 - End Time 2025-03-18 16:55:05  
[2025-03-18 16:55:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709524', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:55:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709524', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:55:21] Production.INFO: ProcessCDR(1,14709524,1,1,2)  
[2025-03-18 16:55:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:55:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709524,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:55:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709524,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709524', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709524', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:55:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:55:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:55:24] Production.INFO: ==18117== Releasing lock...  
[2025-03-18 16:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:55:24] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:56:06
    [end_date_ymd] => 2025-03-18 16:56:06
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:56:06' and `end` < '2025-03-18 16: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-18 16:56:19] Production.INFO: count ==5259  
[2025-03-18 16:56:22] Production.ERROR: pbx CDR StartTime 2025-03-18 13:56:06 - End Time 2025-03-18 16:56:06  
[2025-03-18 16:56:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709529', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709529', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709529', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:56:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709529', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:56:22] Production.INFO: ProcessCDR(1,14709529,1,1,2)  
[2025-03-18 16:56:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:56:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709529,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:56:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:56:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709529,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:56:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709529', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:56:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709529', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:56:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:56:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:56:28] Production.INFO: ==18192== Releasing lock...  
[2025-03-18 16:56:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:56:28] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:57:05
    [end_date_ymd] => 2025-03-18 16:57:05
    [RateCDR] => 1
)
  
[2025-03-18 16:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:57:05' and `end` < '2025-03-18 16:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:57:18] Production.INFO: count ==5258  
[2025-03-18 16:57:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:57:05 - End Time 2025-03-18 16:57:05  
[2025-03-18 16:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709534', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709534', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709534', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:57:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709534', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:57:21] Production.INFO: ProcessCDR(1,14709534,1,1,2)  
[2025-03-18 16:57:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:57:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709534,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:57:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:57:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709534,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:57:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709534', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:57:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709534', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:57:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:57:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:57:26] Production.INFO: ==18265== Releasing lock...  
[2025-03-18 16:57:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:57:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:58:06
    [end_date_ymd] => 2025-03-18 16:58:06
    [RateCDR] => 1
)
  
[2025-03-18 16:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 13:58:06' and `end` < '2025-03-18 16:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 16:58:19] Production.INFO: count ==5260  
[2025-03-18 16:58:21] Production.ERROR: pbx CDR StartTime 2025-03-18 13:58:06 - End Time 2025-03-18 16:58:06  
[2025-03-18 16:58:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709539', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709539', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709539', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:58:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709539', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:58:21] Production.INFO: ProcessCDR(1,14709539,1,1,2)  
[2025-03-18 16:58:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:58:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709539,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:58:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:58:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709539,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:58:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709539', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:58:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709539', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:58:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:58:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:58:27] Production.INFO: ==18336== Releasing lock...  
[2025-03-18 16:58:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:58:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 16:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 13:59:05
    [end_date_ymd] => 2025-03-18 16:59:05
    [RateCDR] => 1
)
  
[2025-03-18 16: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-18 13:59:05' and `end` < '2025-03-18 16: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-18 16:59:18] Production.INFO: count ==5250  
[2025-03-18 16:59:20] Production.ERROR: pbx CDR StartTime 2025-03-18 13:59:05 - End Time 2025-03-18 16:59:05  
[2025-03-18 16:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 16:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709544', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709544', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709544', 'tblTempVendorCDR_20' ) start  
[2025-03-18 16:59:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709544', 'tblTempVendorCDR_20' ) end  
[2025-03-18 16:59:21] Production.INFO: ProcessCDR(1,14709544,1,1,2)  
[2025-03-18 16:59:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709544,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 16:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709544,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 16:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709544', 'tblTempUsageDetail_20' ) start  
[2025-03-18 16:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709544', 'tblTempUsageDetail_20' ) end  
[2025-03-18 16:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 16:59:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 16:59:25] Production.INFO: ==18408== Releasing lock...  
[2025-03-18 16:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 16:59:25] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 17:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:00:06
    [end_date_ymd] => 2025-03-18 17:00:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:00:06' and `end` < '2025-03-18 17: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-18 17:00:20] Production.INFO: count ==5274  
[2025-03-18 17:00:22] Production.ERROR: pbx CDR StartTime 2025-03-18 14:00:06 - End Time 2025-03-18 17:00:06  
[2025-03-18 17:00:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709550', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:00:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709550', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:00:22] Production.INFO: ProcessCDR(1,14709550,1,1,2)  
[2025-03-18 17:00:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:00:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709550,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:00:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:00:28] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709550,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709550', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:00:28] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709550', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:00:28] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:00:28] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:00:28] Production.INFO: ==18523== Releasing lock...  
[2025-03-18 17:00:28] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:00:28] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 17:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:01:06
    [end_date_ymd] => 2025-03-18 17:01:06
    [RateCDR] => 1
)
  
[2025-03-18 17:01:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:01:06' and `end` < '2025-03-18 17:01:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:01:19] Production.INFO: count ==5311  
[2025-03-18 17:01:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:01:06 - End Time 2025-03-18 17:01:06  
[2025-03-18 17:01:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:01:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709555', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:01:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709555', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:01:22] Production.INFO: ProcessCDR(1,14709555,1,1,2)  
[2025-03-18 17:01:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:01:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709555,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:01:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:01:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709555,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709555', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:01:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709555', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:01:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:01:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:01:27] Production.INFO: ==18608== Releasing lock...  
[2025-03-18 17:01:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:01:27] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 17:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:02:05
    [end_date_ymd] => 2025-03-18 17:02:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:02:05' and `end` < '2025-03-18 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-18 17:02:18] Production.INFO: count ==5320  
[2025-03-18 17:02:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:02:05 - End Time 2025-03-18 17:02:05  
[2025-03-18 17:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709560', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709560', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:02:20] Production.INFO: ProcessCDR(1,14709560,1,1,2)  
[2025-03-18 17:02:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:02:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709560,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:02:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:02:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709560,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709560', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709560', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:02:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:02:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:02:25] Production.INFO: ==18686== Releasing lock...  
[2025-03-18 17:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:02:25] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 17:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:03:05
    [end_date_ymd] => 2025-03-18 17:03:05
    [RateCDR] => 1
)
  
[2025-03-18 17:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:03:05' and `end` < '2025-03-18 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-18 17:03:18] Production.INFO: count ==5309  
[2025-03-18 17:03:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:03:05 - End Time 2025-03-18 17:03:05  
[2025-03-18 17:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709565', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709565', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709565', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:03:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709565', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:03:21] Production.INFO: ProcessCDR(1,14709565,1,1,2)  
[2025-03-18 17:03:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:03:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709565,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:03:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:03:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709565,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:03:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709565', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:03:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709565', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:03:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:03:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:03:26] Production.INFO: ==18759== Releasing lock...  
[2025-03-18 17:03:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:03:26] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 17:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:04:06
    [end_date_ymd] => 2025-03-18 17:04:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:04:06' and `end` < '2025-03-18 17: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-18 17:04:19] Production.INFO: count ==5299  
[2025-03-18 17:04:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:04:06 - End Time 2025-03-18 17:04:06  
[2025-03-18 17:04:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709570', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709570', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709570', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709570', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:04:21] Production.INFO: ProcessCDR(1,14709570,1,1,2)  
[2025-03-18 17:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:04:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709570,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:04:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709570,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709570', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:04:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709570', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:04:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:04:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:04:27] Production.INFO: ==18832== Releasing lock...  
[2025-03-18 17:04:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:04:27] Production.INFO: 67.75 MB  #Memory Used#   
[2025-03-18 17:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:05:05
    [end_date_ymd] => 2025-03-18 17:05:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:05:05' and `end` < '2025-03-18 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-18 17:05:18] Production.INFO: count ==5283  
[2025-03-18 17:05:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:05:05 - End Time 2025-03-18 17:05:05  
[2025-03-18 17:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709575', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709575', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709575', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709575', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:05:20] Production.INFO: ProcessCDR(1,14709575,1,1,2)  
[2025-03-18 17:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709575,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:05:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709575,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709575', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709575', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:05:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:05:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:05:25] Production.INFO: ==18904== Releasing lock...  
[2025-03-18 17:05:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:05:25] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 17:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:06:06
    [end_date_ymd] => 2025-03-18 17:06:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:06:06' and `end` < '2025-03-18 17: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-18 17:06:19] Production.INFO: count ==5270  
[2025-03-18 17:06:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:06:06 - End Time 2025-03-18 17:06:06  
[2025-03-18 17:06:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709580', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709580', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709580', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:06:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709580', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:06:22] Production.INFO: ProcessCDR(1,14709580,1,1,2)  
[2025-03-18 17:06:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709580,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:06:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709580,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709580', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709580', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:06:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:06:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:06:25] Production.INFO: ==18978== Releasing lock...  
[2025-03-18 17:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:06:25] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 17:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:07:05
    [end_date_ymd] => 2025-03-18 17:07:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:07:05' and `end` < '2025-03-18 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-18 17:07:18] Production.INFO: count ==5265  
[2025-03-18 17:07:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:07:05 - End Time 2025-03-18 17:07:05  
[2025-03-18 17:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709585', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709585', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709585', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:07:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709585', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:07:21] Production.INFO: ProcessCDR(1,14709585,1,1,2)  
[2025-03-18 17:07:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709585,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709585,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709585', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709585', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:07:24] Production.INFO: ==19053== Releasing lock...  
[2025-03-18 17:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:07:24] Production.INFO: 67.5 MB  #Memory Used#   
[2025-03-18 17:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:08:05
    [end_date_ymd] => 2025-03-18 17:08:05
    [RateCDR] => 1
)
  
[2025-03-18 17:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:08:05' and `end` < '2025-03-18 17:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:08:18] Production.INFO: count ==5247  
[2025-03-18 17:08:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:08:05 - End Time 2025-03-18 17:08:05  
[2025-03-18 17:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709590', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709590', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709590', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709590', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:08:21] Production.INFO: ProcessCDR(1,14709590,1,1,2)  
[2025-03-18 17:08:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709590,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:08:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709590,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709590', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709590', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:08:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:08:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:08:26] Production.INFO: ==19133== Releasing lock...  
[2025-03-18 17:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:08:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 17:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:09:05
    [end_date_ymd] => 2025-03-18 17:09:05
    [RateCDR] => 1
)
  
[2025-03-18 17:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:09:05' and `end` < '2025-03-18 17:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:09:18] Production.INFO: count ==5235  
[2025-03-18 17:09:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:09:05 - End Time 2025-03-18 17:09:05  
[2025-03-18 17:09:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709595', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709595', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709595', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:09:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709595', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:09:21] Production.INFO: ProcessCDR(1,14709595,1,1,2)  
[2025-03-18 17:09:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709595,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709595,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709595', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709595', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:09:26] Production.INFO: ==19209== Releasing lock...  
[2025-03-18 17:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:09:26] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 17:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:10:06
    [end_date_ymd] => 2025-03-18 17:10:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:10:06' and `end` < '2025-03-18 17: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-18 17:10:20] Production.INFO: count ==5228  
[2025-03-18 17:10:22] Production.ERROR: pbx CDR StartTime 2025-03-18 14:10:06 - End Time 2025-03-18 17:10:06  
[2025-03-18 17:10:22] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709601', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:10:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709601', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:10:22] Production.INFO: ProcessCDR(1,14709601,1,1,2)  
[2025-03-18 17:10:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:10:25] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709601,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:10:25] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709601,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709601', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709601', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:10:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:10:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:10:27] Production.INFO: ==19282== Releasing lock...  
[2025-03-18 17:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:10:27] Production.INFO: 67.25 MB  #Memory Used#   
[2025-03-18 17:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:11:05
    [end_date_ymd] => 2025-03-18 17:11:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:11:05' and `end` < '2025-03-18 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-18 17:11:18] Production.INFO: count ==5192  
[2025-03-18 17:11:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:11:05 - End Time 2025-03-18 17:11:05  
[2025-03-18 17:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709606', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709606', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:11:20] Production.INFO: ProcessCDR(1,14709606,1,1,2)  
[2025-03-18 17:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:11:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709606,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:11:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:11:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709606,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709606', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709606', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:11:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:11:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:11:24] Production.INFO: ==19357== Releasing lock...  
[2025-03-18 17:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:11:24] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 17:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:12:06
    [end_date_ymd] => 2025-03-18 17:12:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:12:06' and `end` < '2025-03-18 17: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-18 17:12:19] Production.INFO: count ==5180  
[2025-03-18 17:12:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:12:06 - End Time 2025-03-18 17:12:06  
[2025-03-18 17:12:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709611', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:12:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709611', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:12:21] Production.INFO: ProcessCDR(1,14709611,1,1,2)  
[2025-03-18 17:12:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:12:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:12:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:12:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:12:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:12:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:12:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:12:26] Production.INFO: ==19432== Releasing lock...  
[2025-03-18 17:12:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:12:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 17:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:13:05
    [end_date_ymd] => 2025-03-18 17:13:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:13:05' and `end` < '2025-03-18 17: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-18 17:13:18] Production.INFO: count ==5177  
[2025-03-18 17:13:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:13:05 - End Time 2025-03-18 17:13:05  
[2025-03-18 17:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709616', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709616', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:13:20] Production.INFO: ProcessCDR(1,14709616,1,1,2)  
[2025-03-18 17:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:13:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709616,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:13:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709616,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709616', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709616', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:13:25] Production.INFO: ==19504== Releasing lock...  
[2025-03-18 17:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:13:25] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 17:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:14:06
    [end_date_ymd] => 2025-03-18 17:14:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:14:06' and `end` < '2025-03-18 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-18 17:14:19] Production.INFO: count ==5178  
[2025-03-18 17:14:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:14:06 - End Time 2025-03-18 17:14:06  
[2025-03-18 17:14:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709621', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709621', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709621', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:14:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709621', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:14:21] Production.INFO: ProcessCDR(1,14709621,1,1,2)  
[2025-03-18 17:14:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:14:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709621,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:14:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:14:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709621,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709621', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:14:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709621', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:14:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:14:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:14:26] Production.INFO: ==19575== Releasing lock...  
[2025-03-18 17:14:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:14:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 17:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:15:05
    [end_date_ymd] => 2025-03-18 17:15:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:15:05' and `end` < '2025-03-18 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-18 17:15:18] Production.INFO: count ==5171  
[2025-03-18 17:15:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:15:05 - End Time 2025-03-18 17:15:05  
[2025-03-18 17:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709626', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709626', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709626', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709626', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:15:20] Production.INFO: ProcessCDR(1,14709626,1,1,2)  
[2025-03-18 17:15:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:15:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709626,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:15:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:15:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709626,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709626', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709626', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:15:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:15:23] Production.INFO: ==19689== Releasing lock...  
[2025-03-18 17:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:15:23] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 17:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:16:05
    [end_date_ymd] => 2025-03-18 17:16:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:16:05' and `end` < '2025-03-18 17: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-18 17:16:18] Production.INFO: count ==5145  
[2025-03-18 17:16:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:16:05 - End Time 2025-03-18 17:16:05  
[2025-03-18 17:16:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709631', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709631', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709631', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709631', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:16:21] Production.INFO: ProcessCDR(1,14709631,1,1,2)  
[2025-03-18 17:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709631,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709631,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709631', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709631', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:16:26] Production.INFO: ==19769== Releasing lock...  
[2025-03-18 17:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:16:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 17:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:17:05
    [end_date_ymd] => 2025-03-18 17:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:17:05' and `end` < '2025-03-18 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-18 17:17:19] Production.INFO: count ==5164  
[2025-03-18 17:17:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:17:05 - End Time 2025-03-18 17:17:05  
[2025-03-18 17:17:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709636', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709636', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709636', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:17:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709636', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:17:21] Production.INFO: ProcessCDR(1,14709636,1,1,2)  
[2025-03-18 17:17:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:17:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709636,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:17:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:17:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709636,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709636', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:17:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709636', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:17:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:17:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:17:26] Production.INFO: ==19841== Releasing lock...  
[2025-03-18 17:17:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:17:26] Production.INFO: 66.75 MB  #Memory Used#   
[2025-03-18 17:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:18:05
    [end_date_ymd] => 2025-03-18 17:18:05
    [RateCDR] => 1
)
  
[2025-03-18 17:18:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:18:05' and `end` < '2025-03-18 17:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:18:18] Production.INFO: count ==5146  
[2025-03-18 17:18:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:18:05 - End Time 2025-03-18 17:18:05  
[2025-03-18 17:18:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709641', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709641', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709641', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709641', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:18:20] Production.INFO: ProcessCDR(1,14709641,1,1,2)  
[2025-03-18 17:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:18:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709641,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:18:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709641,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709641', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709641', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:18:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:18:25] Production.INFO: ==19923== Releasing lock...  
[2025-03-18 17:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:18:25] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 17:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:19:05
    [end_date_ymd] => 2025-03-18 17:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:19:05' and `end` < '2025-03-18 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-18 17:19:18] Production.INFO: count ==5134  
[2025-03-18 17:19:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:19:05 - End Time 2025-03-18 17:19:05  
[2025-03-18 17:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709646', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709646', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709646', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:19:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709646', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:19:21] Production.INFO: ProcessCDR(1,14709646,1,1,2)  
[2025-03-18 17:19:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:19:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709646,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:19:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:19:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709646,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:19:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709646', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:19:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709646', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:19:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:19:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:19:26] Production.INFO: ==19996== Releasing lock...  
[2025-03-18 17:19:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:19:26] Production.INFO: 66.5 MB  #Memory Used#   
[2025-03-18 17:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:20:06
    [end_date_ymd] => 2025-03-18 17:20:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:20:06' and `end` < '2025-03-18 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-18 17:20:19] Production.INFO: count ==5116  
[2025-03-18 17:20:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:20:06 - End Time 2025-03-18 17:20:06  
[2025-03-18 17:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709652', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709652', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:20:21] Production.INFO: ProcessCDR(1,14709652,1,1,2)  
[2025-03-18 17:20:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:20:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709652,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:20:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:20:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709652,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709652', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:20:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709652', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:20:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:20:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:20:26] Production.INFO: ==20069== Releasing lock...  
[2025-03-18 17:20:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:20:26] Production.INFO: 66.25 MB  #Memory Used#   
[2025-03-18 17:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:21:06
    [end_date_ymd] => 2025-03-18 17:21:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:21:06' and `end` < '2025-03-18 17: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-18 17:21:19] Production.INFO: count ==5046  
[2025-03-18 17:21:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:21:06 - End Time 2025-03-18 17:21:06  
[2025-03-18 17:21:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709657', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:21:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709657', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:21:21] Production.INFO: ProcessCDR(1,14709657,1,1,2)  
[2025-03-18 17:21:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:21:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709657,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:21:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:21:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709657,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709657', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:21:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709657', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:21:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:21:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:21:25] Production.INFO: ==20145== Releasing lock...  
[2025-03-18 17:21:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:21:25] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 17:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:22:05
    [end_date_ymd] => 2025-03-18 17:22:05
    [RateCDR] => 1
)
  
[2025-03-18 17:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:22:05' and `end` < '2025-03-18 17:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:22:18] Production.INFO: count ==5042  
[2025-03-18 17:22:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:22:05 - End Time 2025-03-18 17:22:05  
[2025-03-18 17:22:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709662', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:22:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709662', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:22:21] Production.INFO: ProcessCDR(1,14709662,1,1,2)  
[2025-03-18 17:22:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:22:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709662,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:22:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:22:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709662,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709662', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:22:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709662', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:22:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:22:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:22:24] Production.INFO: ==20217== Releasing lock...  
[2025-03-18 17:22:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:22:24] Production.INFO: 65.75 MB  #Memory Used#   
[2025-03-18 17:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:23:05
    [end_date_ymd] => 2025-03-18 17:23:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:23:05' and `end` < '2025-03-18 17: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-18 17:23:18] Production.INFO: count ==5014  
[2025-03-18 17:23:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:23:05 - End Time 2025-03-18 17:23:05  
[2025-03-18 17:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709667', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:23:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709667', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:23:21] Production.INFO: ProcessCDR(1,14709667,1,1,2)  
[2025-03-18 17:23:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709667,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:23:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709667,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709667', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:23:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709667', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:23:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:23:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:23:26] Production.INFO: ==20288== Releasing lock...  
[2025-03-18 17:23:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:23:26] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 17:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:24:05
    [end_date_ymd] => 2025-03-18 17:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:24:05' and `end` < '2025-03-18 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-18 17:24:18] Production.INFO: count ==5006  
[2025-03-18 17:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:24:05 - End Time 2025-03-18 17:24:05  
[2025-03-18 17:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709672', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709672', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709672', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:24:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709672', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:24:21] Production.INFO: ProcessCDR(1,14709672,1,1,2)  
[2025-03-18 17:24:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:24:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709672,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:24:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:24:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709672,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:24:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709672', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:24:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709672', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:24:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:24:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:24:24] Production.INFO: ==20359== Releasing lock...  
[2025-03-18 17:24:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:24:24] Production.INFO: 65.5 MB  #Memory Used#   
[2025-03-18 17:25:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:25:06
    [end_date_ymd] => 2025-03-18 17:25:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:25:06' and `end` < '2025-03-18 17: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-18 17:25:19] Production.INFO: count ==4983  
[2025-03-18 17:25:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:25:06 - End Time 2025-03-18 17:25:06  
[2025-03-18 17:25:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709677', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709677', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709677', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709677', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:25:21] Production.INFO: ProcessCDR(1,14709677,1,1,2)  
[2025-03-18 17:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:25:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709677,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:25:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:25:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709677,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:25:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709677', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:25:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709677', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:25:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:25:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:25:24] Production.INFO: ==20431== Releasing lock...  
[2025-03-18 17:25:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:25:24] Production.INFO: 65.25 MB  #Memory Used#   
[2025-03-18 17:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:26:05
    [end_date_ymd] => 2025-03-18 17:26:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:26:05' and `end` < '2025-03-18 17: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-18 17:26:18] Production.INFO: count ==4959  
[2025-03-18 17:26:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:26:05 - End Time 2025-03-18 17:26:05  
[2025-03-18 17:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709682', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709682', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709682', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709682', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:26:20] Production.INFO: ProcessCDR(1,14709682,1,1,2)  
[2025-03-18 17:26:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:26:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709682,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:26:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:26:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709682,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709682', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:26:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709682', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:26:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:26:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:26:23] Production.INFO: ==20511== Releasing lock...  
[2025-03-18 17:26:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:26:23] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 17:27:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:27:06
    [end_date_ymd] => 2025-03-18 17:27:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:27:06' and `end` < '2025-03-18 17: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-18 17:27:19] Production.INFO: count ==4952  
[2025-03-18 17:27:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:27:06 - End Time 2025-03-18 17:27:06  
[2025-03-18 17:27:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709687', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709687', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709687', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:27:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709687', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:27:21] Production.INFO: ProcessCDR(1,14709687,1,1,2)  
[2025-03-18 17:27:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:27:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709687,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:27:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:27:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709687,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709687', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:27:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709687', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:27:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:27:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:27:26] Production.INFO: ==20581== Releasing lock...  
[2025-03-18 17:27:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:27:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 17:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:28:05
    [end_date_ymd] => 2025-03-18 17:28:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:28:05' and `end` < '2025-03-18 17: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-18 17:28:18] Production.INFO: count ==4951  
[2025-03-18 17:28:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:28:05 - End Time 2025-03-18 17:28:05  
[2025-03-18 17:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709692', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709692', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709692', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709692', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:28:20] Production.INFO: ProcessCDR(1,14709692,1,1,2)  
[2025-03-18 17:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:28:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709692,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:28:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:28:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709692,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:28:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709692', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709692', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:28:26] Production.INFO: ==20655== Releasing lock...  
[2025-03-18 17:28:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:28:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 17:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:29:05
    [end_date_ymd] => 2025-03-18 17:29:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:29:05' and `end` < '2025-03-18 17: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-18 17:29:19] Production.INFO: count ==4940  
[2025-03-18 17:29:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:29:05 - End Time 2025-03-18 17:29:05  
[2025-03-18 17:29:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709697', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709697', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709697', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:29:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709697', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:29:21] Production.INFO: ProcessCDR(1,14709697,1,1,2)  
[2025-03-18 17:29:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:29:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709697,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:29:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:29:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709697,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709697', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:29:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709697', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:29:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:29:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:29:26] Production.INFO: ==20732== Releasing lock...  
[2025-03-18 17:29:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:29:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 17:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:30:06
    [end_date_ymd] => 2025-03-18 17:30:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:30:06' and `end` < '2025-03-18 17: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-18 17:30:19] Production.INFO: count ==4933  
[2025-03-18 17:30:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:30:06 - End Time 2025-03-18 17:30:06  
[2025-03-18 17:30:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709703', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:30:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709703', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:30:21] Production.INFO: ProcessCDR(1,14709703,1,1,2)  
[2025-03-18 17:30:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:30:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709703,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:30:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:30:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709703,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709703', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:30:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709703', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:30:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:30:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:30:26] Production.INFO: ==20805== Releasing lock...  
[2025-03-18 17:30:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:30:26] Production.INFO: 65 MB  #Memory Used#   
[2025-03-18 17:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:31:05
    [end_date_ymd] => 2025-03-18 17:31:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:31:05' and `end` < '2025-03-18 17: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-18 17:31:19] Production.INFO: count ==4846  
[2025-03-18 17:31:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:31:05 - End Time 2025-03-18 17:31:05  
[2025-03-18 17:31:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709708', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:31:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709708', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:31:21] Production.INFO: ProcessCDR(1,14709708,1,1,2)  
[2025-03-18 17:31:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:31:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709708,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:31:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:31:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709708,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709708', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:31:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709708', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:31:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:31:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:31:26] Production.INFO: ==20919== Releasing lock...  
[2025-03-18 17:31:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:31:26] Production.INFO: 64.25 MB  #Memory Used#   
[2025-03-18 17:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:32:05
    [end_date_ymd] => 2025-03-18 17:32:05
    [RateCDR] => 1
)
  
[2025-03-18 17:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:32:05' and `end` < '2025-03-18 17:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:32:18] Production.INFO: count ==4829  
[2025-03-18 17:32:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:32:05 - End Time 2025-03-18 17:32:05  
[2025-03-18 17:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709713', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709713', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:32:20] Production.INFO: ProcessCDR(1,14709713,1,1,2)  
[2025-03-18 17:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:32:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709713,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:32:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709713,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709713', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709713', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:32:25] Production.INFO: ==20989== Releasing lock...  
[2025-03-18 17:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:32:25] Production.INFO: 64.25 MB  #Memory Used#   
[2025-03-18 17:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:33:05
    [end_date_ymd] => 2025-03-18 17:33:05
    [RateCDR] => 1
)
  
[2025-03-18 17:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:33:05' and `end` < '2025-03-18 17:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:33:19] Production.INFO: count ==4808  
[2025-03-18 17:33:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:33:05 - End Time 2025-03-18 17:33:05  
[2025-03-18 17:33:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709718', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709718', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709718', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:33:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709718', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:33:21] Production.INFO: ProcessCDR(1,14709718,1,1,2)  
[2025-03-18 17:33:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709718,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709718,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709718', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:33:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709718', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:33:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:33:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:33:26] Production.INFO: ==21062== Releasing lock...  
[2025-03-18 17:33:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:33:26] Production.INFO: 64 MB  #Memory Used#   
[2025-03-18 17:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:34:05
    [end_date_ymd] => 2025-03-18 17:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:34:05' and `end` < '2025-03-18 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-18 17:34:18] Production.INFO: count ==4792  
[2025-03-18 17:34:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:34:05 - End Time 2025-03-18 17:34:05  
[2025-03-18 17:34:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709723', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709723', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709723', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:34:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709723', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:34:20] Production.INFO: ProcessCDR(1,14709723,1,1,2)  
[2025-03-18 17:34:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:34:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709723,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:34:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:34:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709723,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709723', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:34:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709723', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:34:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:34:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:34:25] Production.INFO: ==21137== Releasing lock...  
[2025-03-18 17:34:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:34:25] Production.INFO: 63.75 MB  #Memory Used#   
[2025-03-18 17:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:35:05
    [end_date_ymd] => 2025-03-18 17:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:35:05' and `end` < '2025-03-18 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-18 17:35:18] Production.INFO: count ==4795  
[2025-03-18 17:35:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:35:05 - End Time 2025-03-18 17:35:05  
[2025-03-18 17:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709728', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709728', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709728', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:35:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709728', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:35:21] Production.INFO: ProcessCDR(1,14709728,1,1,2)  
[2025-03-18 17:35:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709728,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:35:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709728,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709728', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:35:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709728', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:35:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:35:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:35:26] Production.INFO: ==21209== Releasing lock...  
[2025-03-18 17:35:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:35:26] Production.INFO: 64 MB  #Memory Used#   
[2025-03-18 17:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:36:05
    [end_date_ymd] => 2025-03-18 17:36:05
    [RateCDR] => 1
)
  
[2025-03-18 17:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:36:05' and `end` < '2025-03-18 17:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:36:18] Production.INFO: count ==4764  
[2025-03-18 17:36:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:36:05 - End Time 2025-03-18 17:36:05  
[2025-03-18 17:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709733', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709733', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709733', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709733', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:36:20] Production.INFO: ProcessCDR(1,14709733,1,1,2)  
[2025-03-18 17:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709733,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709733,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709733', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709733', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:36:25] Production.INFO: ==21279== Releasing lock...  
[2025-03-18 17:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:36:25] Production.INFO: 63.75 MB  #Memory Used#   
[2025-03-18 17:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:37:06
    [end_date_ymd] => 2025-03-18 17:37:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:37:06' and `end` < '2025-03-18 17: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-18 17:37:20] Production.INFO: count ==4756  
[2025-03-18 17:37:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:37:06 - End Time 2025-03-18 17:37:06  
[2025-03-18 17:37:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709738', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709738', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:37:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709738', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:37:22] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709738', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:37:22] Production.INFO: ProcessCDR(1,14709738,1,1,2)  
[2025-03-18 17:37:22] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:37:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709738,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:37:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:37:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709738,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709738', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:37:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709738', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:37:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:37:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:37:26] Production.INFO: ==21355== Releasing lock...  
[2025-03-18 17:37:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:37:26] Production.INFO: 63.5 MB  #Memory Used#   
[2025-03-18 17:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:38:05
    [end_date_ymd] => 2025-03-18 17:38:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:38:05' and `end` < '2025-03-18 17: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-18 17:38:18] Production.INFO: count ==4747  
[2025-03-18 17:38:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:38:05 - End Time 2025-03-18 17:38:05  
[2025-03-18 17:38:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709743', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709743', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709743', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:38:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709743', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:38:20] Production.INFO: ProcessCDR(1,14709743,1,1,2)  
[2025-03-18 17:38:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:38:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709743,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:38:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:38:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709743,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709743', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:38:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709743', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:38:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:38:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:38:25] Production.INFO: ==21428== Releasing lock...  
[2025-03-18 17:38:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:38:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-03-18 17:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:39:05
    [end_date_ymd] => 2025-03-18 17:39:05
    [RateCDR] => 1
)
  
[2025-03-18 17:39:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:39:05' and `end` < '2025-03-18 17:39:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:39:18] Production.INFO: count ==4744  
[2025-03-18 17:39:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:39:05 - End Time 2025-03-18 17:39:05  
[2025-03-18 17:39:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709748', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709748', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709748', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:39:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709748', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:39:20] Production.INFO: ProcessCDR(1,14709748,1,1,2)  
[2025-03-18 17:39:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:39:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709748,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:39:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:39:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709748,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709748', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709748', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:39:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:39:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:39:24] Production.INFO: ==21509== Releasing lock...  
[2025-03-18 17:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:39:24] Production.INFO: 63.5 MB  #Memory Used#   
[2025-03-18 17:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:40:05
    [end_date_ymd] => 2025-03-18 17:40:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:40:05' and `end` < '2025-03-18 17: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-18 17:40:18] Production.INFO: count ==4741  
[2025-03-18 17:40:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:40:05 - End Time 2025-03-18 17:40:05  
[2025-03-18 17:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709754', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709754', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709754', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709754', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:40:20] Production.INFO: ProcessCDR(1,14709754,1,1,2)  
[2025-03-18 17:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709754,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:40:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709754,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709754', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709754', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:40:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:40:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:40:25] Production.INFO: ==21584== Releasing lock...  
[2025-03-18 17:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:40:25] Production.INFO: 63.5 MB  #Memory Used#   
[2025-03-18 17:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:41:05
    [end_date_ymd] => 2025-03-18 17:41:05
    [RateCDR] => 1
)
  
[2025-03-18 17:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:41:05' and `end` < '2025-03-18 17:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:41:19] Production.INFO: count ==4719  
[2025-03-18 17:41:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:41:05 - End Time 2025-03-18 17:41:05  
[2025-03-18 17:41:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709759', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:41:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709759', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:41:20] Production.INFO: ProcessCDR(1,14709759,1,1,2)  
[2025-03-18 17:41:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:41:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709759,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:41:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:41:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709759,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:41:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709759', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:41:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709759', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:41:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:41:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:41:26] Production.INFO: ==21660== Releasing lock...  
[2025-03-18 17:41:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:41:26] Production.INFO: 63.25 MB  #Memory Used#   
[2025-03-18 17:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:42:05
    [end_date_ymd] => 2025-03-18 17:42:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:42:05' and `end` < '2025-03-18 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-18 17:42:18] Production.INFO: count ==4696  
[2025-03-18 17:42:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:42:05 - End Time 2025-03-18 17:42:05  
[2025-03-18 17:42:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709764', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:42:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709764', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:42:20] Production.INFO: ProcessCDR(1,14709764,1,1,2)  
[2025-03-18 17:42:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:42:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709764,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:42:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:42:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709764,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709764', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:42:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709764', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:42:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:42:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:42:25] Production.INFO: ==21732== Releasing lock...  
[2025-03-18 17:42:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:42:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-03-18 17:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:43:05
    [end_date_ymd] => 2025-03-18 17:43:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:43:05' and `end` < '2025-03-18 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-18 17:43:18] Production.INFO: count ==4697  
[2025-03-18 17:43:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:43:05 - End Time 2025-03-18 17:43:05  
[2025-03-18 17:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709769', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709769', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709769', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709769', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:43:20] Production.INFO: ProcessCDR(1,14709769,1,1,2)  
[2025-03-18 17:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709769,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:43:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709769,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709769', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:43:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709769', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:43:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:43:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:43:25] Production.INFO: ==21804== Releasing lock...  
[2025-03-18 17:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:43:25] Production.INFO: 63.25 MB  #Memory Used#   
[2025-03-18 17:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:44:05
    [end_date_ymd] => 2025-03-18 17:44:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:44:05' and `end` < '2025-03-18 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-18 17:44:18] Production.INFO: count ==4662  
[2025-03-18 17:44:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:44:05 - End Time 2025-03-18 17:44:05  
[2025-03-18 17:44:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709774', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709774', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709774', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:44:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709774', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:44:20] Production.INFO: ProcessCDR(1,14709774,1,1,2)  
[2025-03-18 17:44:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:44:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709774,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:44:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:44:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709774,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709774', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:44:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709774', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:44:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:44:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:44:25] Production.INFO: ==21878== Releasing lock...  
[2025-03-18 17:44:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:44:25] Production.INFO: 63 MB  #Memory Used#   
[2025-03-18 17:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:45:05
    [end_date_ymd] => 2025-03-18 17:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:45:05' and `end` < '2025-03-18 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-18 17:45:18] Production.INFO: count ==4653  
[2025-03-18 17:45:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:45:05 - End Time 2025-03-18 17:45:05  
[2025-03-18 17:45:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709779', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709779', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709779', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709779', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:45:20] Production.INFO: ProcessCDR(1,14709779,1,1,2)  
[2025-03-18 17:45:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:45:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709779,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:45:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:45:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709779,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709779', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:45:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709779', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:45:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:45:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:45:26] Production.INFO: ==21951== Releasing lock...  
[2025-03-18 17:45:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:45:26] Production.INFO: 62.75 MB  #Memory Used#   
[2025-03-18 17:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:46:05
    [end_date_ymd] => 2025-03-18 17:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:46:05' and `end` < '2025-03-18 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-18 17:46:19] Production.INFO: count ==4649  
[2025-03-18 17:46:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:46:05 - End Time 2025-03-18 17:46:05  
[2025-03-18 17:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709784', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709784', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709784', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709784', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:46:20] Production.INFO: ProcessCDR(1,14709784,1,1,2)  
[2025-03-18 17:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:46:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709784,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:46:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:46:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709784,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709784', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:46:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709784', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:46:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:46:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:46:24] Production.INFO: ==22066== Releasing lock...  
[2025-03-18 17:46:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:46:24] Production.INFO: 62.75 MB  #Memory Used#   
[2025-03-18 17:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:47:05
    [end_date_ymd] => 2025-03-18 17:47:05
    [RateCDR] => 1
)
  
[2025-03-18 17:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:47:05' and `end` < '2025-03-18 17:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:47:18] Production.INFO: count ==4627  
[2025-03-18 17:47:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:47:05 - End Time 2025-03-18 17:47:05  
[2025-03-18 17:47:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709789', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709789', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709789', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:47:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709789', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:47:20] Production.INFO: ProcessCDR(1,14709789,1,1,2)  
[2025-03-18 17:47:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:47:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709789,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:47:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:47:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709789,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709789', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:47:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709789', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:47:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:47:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:47:26] Production.INFO: ==22139== Releasing lock...  
[2025-03-18 17:47:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:47:26] Production.INFO: 62.5 MB  #Memory Used#   
[2025-03-18 17:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:48:06
    [end_date_ymd] => 2025-03-18 17:48:06
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:48:06' and `end` < '2025-03-18 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-18 17:48:19] Production.INFO: count ==4610  
[2025-03-18 17:48:21] Production.ERROR: pbx CDR StartTime 2025-03-18 14:48:06 - End Time 2025-03-18 17:48:06  
[2025-03-18 17:48:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709794', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709794', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709794', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:48:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709794', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:48:21] Production.INFO: ProcessCDR(1,14709794,1,1,2)  
[2025-03-18 17:48:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:48:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709794,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:48:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:48:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709794,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:48:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709794', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:48:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709794', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:48:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:48:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:48:27] Production.INFO: ==22212== Releasing lock...  
[2025-03-18 17:48:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:48:27] Production.INFO: 62.5 MB  #Memory Used#   
[2025-03-18 17:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:49:05
    [end_date_ymd] => 2025-03-18 17:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:49:05' and `end` < '2025-03-18 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-18 17:49:18] Production.INFO: count ==4585  
[2025-03-18 17:49:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:49:05 - End Time 2025-03-18 17:49:05  
[2025-03-18 17:49:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709799', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709799', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709799', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:49:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709799', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:49:20] Production.INFO: ProcessCDR(1,14709799,1,1,2)  
[2025-03-18 17:49:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:49:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709799,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:49:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:49:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709799,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709799', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:49:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709799', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:49:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:49:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:49:25] Production.INFO: ==22283== Releasing lock...  
[2025-03-18 17:49:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:49:25] Production.INFO: 62.25 MB  #Memory Used#   
[2025-03-18 17:50:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:50:05
    [end_date_ymd] => 2025-03-18 17:50:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:50:05' and `end` < '2025-03-18 17: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-18 17:50:18] Production.INFO: count ==4584  
[2025-03-18 17:50:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:50:05 - End Time 2025-03-18 17:50:05  
[2025-03-18 17:50:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709804', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709804', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709804', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709804', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:50:20] Production.INFO: ProcessCDR(1,14709804,1,1,2)  
[2025-03-18 17:50:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:50:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709804,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:50:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:50:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709804,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:50:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709804', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:50:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709804', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:50:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:50:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:50:23] Production.INFO: ==22361== Releasing lock...  
[2025-03-18 17:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:50:23] Production.INFO: 62.25 MB  #Memory Used#   
[2025-03-18 17:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:51:06
    [end_date_ymd] => 2025-03-18 17:51:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:51:06' and `end` < '2025-03-18 17: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-18 17:51:19] Production.INFO: count ==4560  
[2025-03-18 17:51:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:51:06 - End Time 2025-03-18 17:51:06  
[2025-03-18 17:51:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709810', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:51:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709810', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:51:20] Production.INFO: ProcessCDR(1,14709810,1,1,2)  
[2025-03-18 17:51:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:51:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709810,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:51:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:51:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709810,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:51:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709810', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:51:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709810', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:51:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:51:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:51:24] Production.INFO: ==22437== Releasing lock...  
[2025-03-18 17:51:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:51:24] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:52:06
    [end_date_ymd] => 2025-03-18 17:52:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:52:06' and `end` < '2025-03-18 17: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-18 17:52:19] Production.INFO: count ==4553  
[2025-03-18 17:52:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:52:06 - End Time 2025-03-18 17:52:06  
[2025-03-18 17:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709815', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709815', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:52:20] Production.INFO: ProcessCDR(1,14709815,1,1,2)  
[2025-03-18 17:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:52:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709815,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:52:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709815,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709815', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709815', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:52:25] Production.INFO: ==22509== Releasing lock...  
[2025-03-18 17:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:52:25] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:53:05
    [end_date_ymd] => 2025-03-18 17:53:05
    [RateCDR] => 1
)
  
[2025-03-18 17:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:53:05' and `end` < '2025-03-18 17:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:53:18] Production.INFO: count ==4557  
[2025-03-18 17:53:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:53:05 - End Time 2025-03-18 17:53:05  
[2025-03-18 17:53:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709820', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709820', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709820', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:53:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709820', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:53:20] Production.INFO: ProcessCDR(1,14709820,1,1,2)  
[2025-03-18 17:53:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:53:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709820,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:53:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:53:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709820,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709820', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:53:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709820', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:53:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:53:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:53:25] Production.INFO: ==22580== Releasing lock...  
[2025-03-18 17:53:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:53:25] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:54:06
    [end_date_ymd] => 2025-03-18 17:54:06
    [RateCDR] => 1
)
  
[2025-03-18 17:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:54:06' and `end` < '2025-03-18 17:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:54:19] Production.INFO: count ==4553  
[2025-03-18 17:54:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:54:06 - End Time 2025-03-18 17:54:06  
[2025-03-18 17:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709825', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709825', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709825', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:54:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709825', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:54:21] Production.INFO: ProcessCDR(1,14709825,1,1,2)  
[2025-03-18 17:54:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:54:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709825,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:54:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:54:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709825,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709825', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:54:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709825', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:54:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:54:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:54:25] Production.INFO: ==22652== Releasing lock...  
[2025-03-18 17:54:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:54:25] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:55:05
    [end_date_ymd] => 2025-03-18 17:55:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:55:05' and `end` < '2025-03-18 17: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-18 17:55:18] Production.INFO: count ==4550  
[2025-03-18 17:55:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:55:05 - End Time 2025-03-18 17:55:05  
[2025-03-18 17:55:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709830', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709830', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709830', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:55:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709830', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:55:20] Production.INFO: ProcessCDR(1,14709830,1,1,2)  
[2025-03-18 17:55:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:55:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709830,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:55:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:55:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709830,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709830', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:55:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709830', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:55:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:55:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:55:26] Production.INFO: ==22727== Releasing lock...  
[2025-03-18 17:55:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:55:26] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:56:05
    [end_date_ymd] => 2025-03-18 17:56:05
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:56:05' and `end` < '2025-03-18 17: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-18 17:56:18] Production.INFO: count ==4558  
[2025-03-18 17:56:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:56:05 - End Time 2025-03-18 17:56:05  
[2025-03-18 17:56:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709835', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709835', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709835', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:56:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709835', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:56:20] Production.INFO: ProcessCDR(1,14709835,1,1,2)  
[2025-03-18 17:56:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:56:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709835,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:56:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:56:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709835,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709835', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:56:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709835', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:56:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:56:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:56:25] Production.INFO: ==22800== Releasing lock...  
[2025-03-18 17:56:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:56:25] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:57:06
    [end_date_ymd] => 2025-03-18 17:57:06
    [RateCDR] => 1
)
  
[2025-03-18 17: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-18 14:57:06' and `end` < '2025-03-18 17: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-18 17:57:19] Production.INFO: count ==4567  
[2025-03-18 17:57:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:57:06 - End Time 2025-03-18 17:57:06  
[2025-03-18 17:57:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709840', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709840', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709840', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:57:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709840', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:57:20] Production.INFO: ProcessCDR(1,14709840,1,1,2)  
[2025-03-18 17:57:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:57:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709840,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:57:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:57:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709840,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709840', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:57:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709840', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:57:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:57:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:57:24] Production.INFO: ==22879== Releasing lock...  
[2025-03-18 17:57:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:57:24] Production.INFO: 62.25 MB  #Memory Used#   
[2025-03-18 17:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:58:05
    [end_date_ymd] => 2025-03-18 17:58:05
    [RateCDR] => 1
)
  
[2025-03-18 17:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 14:58:05' and `end` < '2025-03-18 17:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 17:58:19] Production.INFO: count ==4553  
[2025-03-18 17:58:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:58:05 - End Time 2025-03-18 17:58:05  
[2025-03-18 17:58:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709845', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709845', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709845', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:58:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709845', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:58:20] Production.INFO: ProcessCDR(1,14709845,1,1,2)  
[2025-03-18 17:58:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:58:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709845,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:58:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:58:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709845,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709845', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709845', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:58:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:58:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:58:24] Production.INFO: ==22953== Releasing lock...  
[2025-03-18 17:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:58:24] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 17:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 14:59:05
    [end_date_ymd] => 2025-03-18 17:59:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 14:59:05' and `end` < '2025-03-18 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-18 17:59:18] Production.INFO: count ==4535  
[2025-03-18 17:59:20] Production.ERROR: pbx CDR StartTime 2025-03-18 14:59:05 - End Time 2025-03-18 17:59:05  
[2025-03-18 17:59:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709850', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709850', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709850', 'tblTempVendorCDR_20' ) start  
[2025-03-18 17:59:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709850', 'tblTempVendorCDR_20' ) end  
[2025-03-18 17:59:20] Production.INFO: ProcessCDR(1,14709850,1,1,2)  
[2025-03-18 17:59:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:59:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709850,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 17:59:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:59:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709850,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 17:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709850', 'tblTempUsageDetail_20' ) start  
[2025-03-18 17:59:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709850', 'tblTempUsageDetail_20' ) end  
[2025-03-18 17:59:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 17:59:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 17:59:25] Production.INFO: ==23029== Releasing lock...  
[2025-03-18 17:59:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 17:59:25] Production.INFO: 62 MB  #Memory Used#   
[2025-03-18 18:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:00:06
    [end_date_ymd] => 2025-03-18 18:00:06
    [RateCDR] => 1
)
  
[2025-03-18 18:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:00:06' and `end` < '2025-03-18 18:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:00:19] Production.INFO: count ==4513  
[2025-03-18 18:00:21] Production.ERROR: pbx CDR StartTime 2025-03-18 15:00:06 - End Time 2025-03-18 18:00:06  
[2025-03-18 18:00:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709855', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709855', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709855', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709855', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:00:21] Production.INFO: ProcessCDR(1,14709855,1,1,2)  
[2025-03-18 18:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:00:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709855,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:00:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:00:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709855,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:00:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709855', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:00:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709855', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:00:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:00:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:00:27] Production.INFO: ==23105== Releasing lock...  
[2025-03-18 18:00:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:00:27] Production.INFO: 61.75 MB  #Memory Used#   
[2025-03-18 18:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:01:05
    [end_date_ymd] => 2025-03-18 18:01:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:01:05' and `end` < '2025-03-18 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-18 18:01:18] Production.INFO: count ==4444  
[2025-03-18 18:01:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:01:05 - End Time 2025-03-18 18:01:05  
[2025-03-18 18:01:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709861', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:01:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709861', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:01:20] Production.INFO: ProcessCDR(1,14709861,1,1,2)  
[2025-03-18 18:01:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:01:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709861,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:01:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:01:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709861,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709861', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709861', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:01:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:01:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:01:24] Production.INFO: ==23192== Releasing lock...  
[2025-03-18 18:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:01:24] Production.INFO: 61.25 MB  #Memory Used#   
[2025-03-18 18:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:02:06
    [end_date_ymd] => 2025-03-18 18:02:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:02:06' and `end` < '2025-03-18 18: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-18 18:02:19] Production.INFO: count ==4377  
[2025-03-18 18:02:21] Production.ERROR: pbx CDR StartTime 2025-03-18 15:02:06 - End Time 2025-03-18 18:02:06  
[2025-03-18 18:02:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709866', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709866', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709866', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:02:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709866', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:02:21] Production.INFO: ProcessCDR(1,14709866,1,1,2)  
[2025-03-18 18:02:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:02:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709866,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:02:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:02:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709866,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709866', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:02:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709866', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:02:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:02:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:02:25] Production.INFO: ==23301== Releasing lock...  
[2025-03-18 18:02:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:02:25] Production.INFO: 60.75 MB  #Memory Used#   
[2025-03-18 18:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:03:05
    [end_date_ymd] => 2025-03-18 18:03:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:03:05' and `end` < '2025-03-18 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-18 18:03:18] Production.INFO: count ==4330  
[2025-03-18 18:03:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:03:05 - End Time 2025-03-18 18:03:05  
[2025-03-18 18:03:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709871', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709871', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709871', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:03:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709871', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:03:20] Production.INFO: ProcessCDR(1,14709871,1,1,2)  
[2025-03-18 18:03:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:03:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709871,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:03:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:03:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709871,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:03:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709871', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:03:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709871', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:03:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:03:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:03:24] Production.INFO: ==23380== Releasing lock...  
[2025-03-18 18:03:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:03:24] Production.INFO: 60.25 MB  #Memory Used#   
[2025-03-18 18:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:04:06
    [end_date_ymd] => 2025-03-18 18:04:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:04:06' and `end` < '2025-03-18 18: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-18 18:04:19] Production.INFO: count ==4318  
[2025-03-18 18:04:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:04:06 - End Time 2025-03-18 18:04:06  
[2025-03-18 18:04:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709876', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709876', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709876', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:04:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709876', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:04:21] Production.INFO: ProcessCDR(1,14709876,1,1,2)  
[2025-03-18 18:04:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:04:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709876,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:04:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709876,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709876', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709876', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:04:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:04:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:04:26] Production.INFO: ==23455== Releasing lock...  
[2025-03-18 18:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:04:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-03-18 18:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:05:05
    [end_date_ymd] => 2025-03-18 18:05:05
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:05:05' and `end` < '2025-03-18 18: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-18 18:05:18] Production.INFO: count ==4308  
[2025-03-18 18:05:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:05:05 - End Time 2025-03-18 18:05:05  
[2025-03-18 18:05:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709881', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709881', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709881', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709881', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:05:20] Production.INFO: ProcessCDR(1,14709881,1,1,2)  
[2025-03-18 18:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:05:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709881,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:05:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:05:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709881,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:05:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709881', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:05:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709881', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:05:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:05:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:05:26] Production.INFO: ==23531== Releasing lock...  
[2025-03-18 18:05:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:05:26] Production.INFO: 60.25 MB  #Memory Used#   
[2025-03-18 18:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:06:06
    [end_date_ymd] => 2025-03-18 18:06:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:06:06' and `end` < '2025-03-18 18: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-18 18:06:19] Production.INFO: count ==4292  
[2025-03-18 18:06:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:06:06 - End Time 2025-03-18 18:06:06  
[2025-03-18 18:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709886', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709886', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709886', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:06:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709886', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:06:21] Production.INFO: ProcessCDR(1,14709886,1,1,2)  
[2025-03-18 18:06:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:06:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709886,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:06:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:06:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709886,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709886', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:06:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709886', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:06:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:06:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:06:26] Production.INFO: ==23602== Releasing lock...  
[2025-03-18 18:06:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:06:26] Production.INFO: 60 MB  #Memory Used#   
[2025-03-18 18:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:07:05
    [end_date_ymd] => 2025-03-18 18:07:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:07:05' and `end` < '2025-03-18 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-18 18:07:18] Production.INFO: count ==4274  
[2025-03-18 18:07:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:07:05 - End Time 2025-03-18 18:07:05  
[2025-03-18 18:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709891', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709891', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709891', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709891', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:07:20] Production.INFO: ProcessCDR(1,14709891,1,1,2)  
[2025-03-18 18:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709891,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:07:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709891,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709891', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:07:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709891', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:07:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:07:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:07:26] Production.INFO: ==23676== Releasing lock...  
[2025-03-18 18:07:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:07:26] Production.INFO: 60 MB  #Memory Used#   
[2025-03-18 18:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:08:06
    [end_date_ymd] => 2025-03-18 18:08:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:08:06' and `end` < '2025-03-18 18: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-18 18:08:19] Production.INFO: count ==4257  
[2025-03-18 18:08:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:08:06 - End Time 2025-03-18 18:08:06  
[2025-03-18 18:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709896', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709896', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709896', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:08:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709896', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:08:21] Production.INFO: ProcessCDR(1,14709896,1,1,2)  
[2025-03-18 18:08:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:08:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709896,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:08:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:08:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709896,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709896', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709896', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:08:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:08:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:08:26] Production.INFO: ==23750== Releasing lock...  
[2025-03-18 18:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:08:26] Production.INFO: 59.75 MB  #Memory Used#   
[2025-03-18 18:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:09:05
    [end_date_ymd] => 2025-03-18 18:09:05
    [RateCDR] => 1
)
  
[2025-03-18 18:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:09:05' and `end` < '2025-03-18 18:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:09:18] Production.INFO: count ==4237  
[2025-03-18 18:09:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:09:05 - End Time 2025-03-18 18:09:05  
[2025-03-18 18:09:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709901', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709901', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709901', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:09:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709901', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:09:20] Production.INFO: ProcessCDR(1,14709901,1,1,2)  
[2025-03-18 18:09:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:09:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709901,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:09:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:09:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709901,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709901', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:09:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709901', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:09:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:09:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:09:26] Production.INFO: ==23822== Releasing lock...  
[2025-03-18 18:09:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:09:26] Production.INFO: 59.75 MB  #Memory Used#   
[2025-03-18 18:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:10:06
    [end_date_ymd] => 2025-03-18 18:10:06
    [RateCDR] => 1
)
  
[2025-03-18 18:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:10:06' and `end` < '2025-03-18 18:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:10:19] Production.INFO: count ==4226  
[2025-03-18 18:10:21] Production.ERROR: pbx CDR StartTime 2025-03-18 15:10:06 - End Time 2025-03-18 18:10:06  
[2025-03-18 18:10:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709907', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709907', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:10:21] Production.INFO: ProcessCDR(1,14709907,1,1,2)  
[2025-03-18 18:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:10:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709907,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:10:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:10:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709907,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709907', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:10:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709907', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:10:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:10:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:10:25] Production.INFO: ==23899== Releasing lock...  
[2025-03-18 18:10:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:10:25] Production.INFO: 59.75 MB  #Memory Used#   
[2025-03-18 18:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:11:06
    [end_date_ymd] => 2025-03-18 18:11:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:11:06' and `end` < '2025-03-18 18: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-18 18:11:19] Production.INFO: count ==4137  
[2025-03-18 18:11:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:11:06 - End Time 2025-03-18 18:11:06  
[2025-03-18 18:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709912', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709912', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:11:20] Production.INFO: ProcessCDR(1,14709912,1,1,2)  
[2025-03-18 18:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:11:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709912,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:11:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:11:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709912,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709912', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:11:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709912', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:11:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:11:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:11:24] Production.INFO: ==23979== Releasing lock...  
[2025-03-18 18:11:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:11:24] Production.INFO: 59 MB  #Memory Used#   
[2025-03-18 18:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:12:06
    [end_date_ymd] => 2025-03-18 18:12:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:12:06' and `end` < '2025-03-18 18: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-18 18:12:19] Production.INFO: count ==4124  
[2025-03-18 18:12:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:12:06 - End Time 2025-03-18 18:12:06  
[2025-03-18 18:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709917', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709917', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709917', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709917', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:12:20] Production.INFO: ProcessCDR(1,14709917,1,1,2)  
[2025-03-18 18:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:12:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709917,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:12:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:12:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709917,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709917', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:12:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709917', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:12:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:12:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:12:24] Production.INFO: ==24051== Releasing lock...  
[2025-03-18 18:12:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:12:24] Production.INFO: 58.75 MB  #Memory Used#   
[2025-03-18 18:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:13:05
    [end_date_ymd] => 2025-03-18 18:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:13:05' and `end` < '2025-03-18 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-18 18:13:18] Production.INFO: count ==4101  
[2025-03-18 18:13:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:13:05 - End Time 2025-03-18 18:13:05  
[2025-03-18 18:13:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709922', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709922', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709922', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:13:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709922', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:13:19] Production.INFO: ProcessCDR(1,14709922,1,1,2)  
[2025-03-18 18:13:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:13:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709922,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:13:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:13:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709922,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709922', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:13:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709922', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:13:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:13:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:13:25] Production.INFO: ==24124== Releasing lock...  
[2025-03-18 18:13:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:13:25] Production.INFO: 58.75 MB  #Memory Used#   
[2025-03-18 18:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:14:06
    [end_date_ymd] => 2025-03-18 18:14:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:14:06' and `end` < '2025-03-18 18: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-18 18:14:19] Production.INFO: count ==4069  
[2025-03-18 18:14:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:14:06 - End Time 2025-03-18 18:14:06  
[2025-03-18 18:14:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709927', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709927', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709927', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:14:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709927', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:14:20] Production.INFO: ProcessCDR(1,14709927,1,1,2)  
[2025-03-18 18:14:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:14:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709927,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:14:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:14:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709927,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709927', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709927', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:14:25] Production.INFO: ==24197== Releasing lock...  
[2025-03-18 18:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:14:25] Production.INFO: 58.25 MB  #Memory Used#   
[2025-03-18 18:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:15:05
    [end_date_ymd] => 2025-03-18 18:15:05
    [RateCDR] => 1
)
  
[2025-03-18 18:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:15:05' and `end` < '2025-03-18 18:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:15:18] Production.INFO: count ==4044  
[2025-03-18 18:15:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:15:05 - End Time 2025-03-18 18:15:05  
[2025-03-18 18:15:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709932', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709932', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709932', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:15:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709932', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:15:19] Production.INFO: ProcessCDR(1,14709932,1,1,2)  
[2025-03-18 18:15:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:15:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709932,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:15:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:15:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709932,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:15:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709932', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:15:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709932', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:15:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:15:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:15:24] Production.INFO: ==24270== Releasing lock...  
[2025-03-18 18:15:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:15:24] Production.INFO: 58.25 MB  #Memory Used#   
[2025-03-18 18:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:16:06
    [end_date_ymd] => 2025-03-18 18:16:06
    [RateCDR] => 1
)
  
[2025-03-18 18:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:16:06' and `end` < '2025-03-18 18:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:16:19] Production.INFO: count ==4039  
[2025-03-18 18:16:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:16:06 - End Time 2025-03-18 18:16:06  
[2025-03-18 18:16:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:16:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709937', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709937', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709937', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:16:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709937', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:16:21] Production.INFO: ProcessCDR(1,14709937,1,1,2)  
[2025-03-18 18:16:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:16:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709937,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:16:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:16:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709937,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709937', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:16:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709937', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:16:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:16:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:16:26] Production.INFO: ==24343== Releasing lock...  
[2025-03-18 18:16:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:16:26] Production.INFO: 58.25 MB  #Memory Used#   
[2025-03-18 18:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:17:05
    [end_date_ymd] => 2025-03-18 18:17:05
    [RateCDR] => 1
)
  
[2025-03-18 18:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:17:05' and `end` < '2025-03-18 18:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:17:18] Production.INFO: count ==4032  
[2025-03-18 18:17:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:17:05 - End Time 2025-03-18 18:17:05  
[2025-03-18 18:17:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709942', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709942', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709942', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709942', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:17:19] Production.INFO: ProcessCDR(1,14709942,1,1,2)  
[2025-03-18 18:17:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709942,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709942,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709942', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709942', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:17:23] Production.INFO: ==24455== Releasing lock...  
[2025-03-18 18:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:17:23] Production.INFO: 58 MB  #Memory Used#   
[2025-03-18 18:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:18:05
    [end_date_ymd] => 2025-03-18 18:18:05
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:18:05' and `end` < '2025-03-18 18: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-18 18:18:18] Production.INFO: count ==4021  
[2025-03-18 18:18:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:18:05 - End Time 2025-03-18 18:18:05  
[2025-03-18 18:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709947', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709947', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709947', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:18:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709947', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:18:20] Production.INFO: ProcessCDR(1,14709947,1,1,2)  
[2025-03-18 18:18:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:18:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709947,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:18:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:18:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709947,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:18:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709947', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:18:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709947', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:18:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:18:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:18:23] Production.INFO: ==24527== Releasing lock...  
[2025-03-18 18:18:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:18:23] Production.INFO: 58 MB  #Memory Used#   
[2025-03-18 18:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:19:05
    [end_date_ymd] => 2025-03-18 18:19:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:19:05' and `end` < '2025-03-18 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-18 18:19:18] Production.INFO: count ==4006  
[2025-03-18 18:19:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:19:05 - End Time 2025-03-18 18:19:05  
[2025-03-18 18:19:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709952', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709952', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709952', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:19:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709952', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:19:19] Production.INFO: ProcessCDR(1,14709952,1,1,2)  
[2025-03-18 18:19:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:19:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709952,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:19:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:19:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709952,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709952', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:19:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709952', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:19:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:19:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:19:24] Production.INFO: ==24599== Releasing lock...  
[2025-03-18 18:19:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:19:24] Production.INFO: 58 MB  #Memory Used#   
[2025-03-18 18:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:20:07
    [end_date_ymd] => 2025-03-18 18:20:07
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:20:07' and `end` < '2025-03-18 18: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-18 18:20:19] Production.INFO: count ==4002  
[2025-03-18 18:20:21] Production.ERROR: pbx CDR StartTime 2025-03-18 15:20:07 - End Time 2025-03-18 18:20:07  
[2025-03-18 18:20:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709958', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:20:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709958', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:20:21] Production.INFO: ProcessCDR(1,14709958,1,1,2)  
[2025-03-18 18:20:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:20:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709958,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:20:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:20:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709958,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709958', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:20:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709958', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:20:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:20:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:20:25] Production.INFO: ==24674== Releasing lock...  
[2025-03-18 18:20:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:20:25] Production.INFO: 57.75 MB  #Memory Used#   
[2025-03-18 18:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:21:05
    [end_date_ymd] => 2025-03-18 18:21:05
    [RateCDR] => 1
)
  
[2025-03-18 18:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:21:05' and `end` < '2025-03-18 18:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:21:18] Production.INFO: count ==3951  
[2025-03-18 18:21:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:21:05 - End Time 2025-03-18 18:21:05  
[2025-03-18 18:21:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709963', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709963', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:21:19] Production.INFO: ProcessCDR(1,14709963,1,1,2)  
[2025-03-18 18:21:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:21:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709963,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:21:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:21:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709963,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709963', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709963', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:21:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:21:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:21:24] Production.INFO: ==24750== Releasing lock...  
[2025-03-18 18:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:21:24] Production.INFO: 57.75 MB  #Memory Used#   
[2025-03-18 18:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:22:05
    [end_date_ymd] => 2025-03-18 18:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:22:05' and `end` < '2025-03-18 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-18 18:22:18] Production.INFO: count ==3940  
[2025-03-18 18:22:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:22:05 - End Time 2025-03-18 18:22:05  
[2025-03-18 18:22:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709968', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709968', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709968', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:22:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709968', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:22:20] Production.INFO: ProcessCDR(1,14709968,1,1,2)  
[2025-03-18 18:22:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709968,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709968,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709968', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709968', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:22:23] Production.INFO: ==24823== Releasing lock...  
[2025-03-18 18:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:22:23] Production.INFO: 57.5 MB  #Memory Used#   
[2025-03-18 18:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:23:06
    [end_date_ymd] => 2025-03-18 18:23:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:23:06' and `end` < '2025-03-18 18: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-18 18:23:19] Production.INFO: count ==3912  
[2025-03-18 18:23:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:23:06 - End Time 2025-03-18 18:23:06  
[2025-03-18 18:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709973', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709973', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709973', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709973', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:23:20] Production.INFO: ProcessCDR(1,14709973,1,1,2)  
[2025-03-18 18:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709973,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709973,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709973', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709973', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:23:25] Production.INFO: ==24896== Releasing lock...  
[2025-03-18 18:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:23:25] Production.INFO: 57.5 MB  #Memory Used#   
[2025-03-18 18:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:24:05
    [end_date_ymd] => 2025-03-18 18:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:24:05' and `end` < '2025-03-18 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-18 18:24:18] Production.INFO: count ==3908  
[2025-03-18 18:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:24:05 - End Time 2025-03-18 18:24:05  
[2025-03-18 18:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709978', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709978', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709978', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709978', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:24:20] Production.INFO: ProcessCDR(1,14709978,1,1,2)  
[2025-03-18 18:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:24:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709978,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:24:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709978,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709978', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709978', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:24:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:24:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:24:25] Production.INFO: ==24974== Releasing lock...  
[2025-03-18 18:24:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:24:25] Production.INFO: 57.25 MB  #Memory Used#   
[2025-03-18 18:25:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:25:06
    [end_date_ymd] => 2025-03-18 18:25:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:25:06' and `end` < '2025-03-18 18: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-18 18:25:19] Production.INFO: count ==3909  
[2025-03-18 18:25:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:25:06 - End Time 2025-03-18 18:25:06  
[2025-03-18 18:25:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:25:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709983', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709983', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709983', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:25:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709983', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:25:21] Production.INFO: ProcessCDR(1,14709983,1,1,2)  
[2025-03-18 18:25:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:25:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709983,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:25:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:25:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709983,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:25:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709983', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:25:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709983', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:25:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:25:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:25:26] Production.INFO: ==25049== Releasing lock...  
[2025-03-18 18:25:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:25:26] Production.INFO: 57.25 MB  #Memory Used#   
[2025-03-18 18:26:21] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:26:21
    [end_date_ymd] => 2025-03-18 18:26:21
    [RateCDR] => 1
)
  
[2025-03-18 18:26:21] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:26:21' and `end` < '2025-03-18 18:26:21'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:26:33] Production.INFO: count ==3914  
[2025-03-18 18:27:23] Production.ERROR: pbx CDR StartTime 2025-03-18 15:26:21 - End Time 2025-03-18 18:26:21  
[2025-03-18 18:27:23] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:27:23] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709988', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:27:29] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709988', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:27:29] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709988', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:27:31] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709988', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:27:31] Production.INFO: ProcessCDR(1,14709988,1,1,2)  
[2025-03-18 18:27:31] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:27:42] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709988,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:27:42] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:28:18] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709988,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:28:18] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709988', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:28:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709988', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:28:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:28:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:28:31] Production.INFO: ==25124== Releasing lock...  
[2025-03-18 18:28:31] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:28:31] Production.INFO: 57.25 MB  #Memory Used#   
[2025-03-18 18:29:18] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:29:18
    [end_date_ymd] => 2025-03-18 18:29:18
    [RateCDR] => 1
)
  
[2025-03-18 18:29:18] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:29:18' and `end` < '2025-03-18 18:29:18'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:29:31] Production.INFO: count ==3901  
[2025-03-18 18:29:57] Production.ERROR: pbx CDR StartTime 2025-03-18 15:29:18 - End Time 2025-03-18 18:29:18  
[2025-03-18 18:29:57] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:29:57] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:30:00] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14709999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:30:00] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709999', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:30:04] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14709999', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:30:04] Production.INFO: ProcessCDR(1,14709999,1,1,2)  
[2025-03-18 18:30:04] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14709999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:30:15] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14709999,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:30:15] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14709999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:30:40] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14709999,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:30:40] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709999', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:30:47] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14709999', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:30:47] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:30:47] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:30:47] Production.INFO: ==25336== Releasing lock...  
[2025-03-18 18:30:47] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:30:47] Production.INFO: 57 MB  #Memory Used#   
[2025-03-18 18:31:14] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:31:14
    [end_date_ymd] => 2025-03-18 18:31:14
    [RateCDR] => 1
)
  
[2025-03-18 18:31:14] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:31:14' and `end` < '2025-03-18 18:31:14'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:31:27] Production.INFO: count ==3858  
[2025-03-18 18:31:41] Production.ERROR: pbx CDR StartTime 2025-03-18 15:31:14 - End Time 2025-03-18 18:31:14  
[2025-03-18 18:31:41] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:31:41] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710007', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:31:41] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710007', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:31:41] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710007', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:31:41] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710007', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:31:41] Production.INFO: ProcessCDR(1,14710007,1,1,2)  
[2025-03-18 18:31:41] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:31:44] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710007,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:31:44] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:31:47] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710007,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:31:47] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710007', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:31:47] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710007', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:31:47] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:31:47] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:31:47] Production.INFO: ==25474== Releasing lock...  
[2025-03-18 18:31:47] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:31:47] Production.INFO: 56.75 MB  #Memory Used#   
[2025-03-18 18:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:32:05
    [end_date_ymd] => 2025-03-18 18:32:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:32:05' and `end` < '2025-03-18 18: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-18 18:32:18] Production.INFO: count ==3854  
[2025-03-18 18:32:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:32:05 - End Time 2025-03-18 18:32:05  
[2025-03-18 18:32:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710012', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710012', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710012', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710012', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:32:20] Production.INFO: ProcessCDR(1,14710012,1,1,2)  
[2025-03-18 18:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:32:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710012,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:32:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710012,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710012', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710012', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:32:25] Production.INFO: ==25590== Releasing lock...  
[2025-03-18 18:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:32:25] Production.INFO: 56.75 MB  #Memory Used#   
[2025-03-18 18:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:33:06
    [end_date_ymd] => 2025-03-18 18:33:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:33:06' and `end` < '2025-03-18 18: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-18 18:33:19] Production.INFO: count ==3841  
[2025-03-18 18:33:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:33:06 - End Time 2025-03-18 18:33:06  
[2025-03-18 18:33:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710017', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710017', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710017', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:33:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710017', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:33:20] Production.INFO: ProcessCDR(1,14710017,1,1,2)  
[2025-03-18 18:33:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:33:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710017,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:33:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:33:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710017,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710017', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:33:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710017', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:33:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:33:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:33:25] Production.INFO: ==25666== Releasing lock...  
[2025-03-18 18:33:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:33:25] Production.INFO: 57.25 MB  #Memory Used#   
[2025-03-18 18:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:34:05
    [end_date_ymd] => 2025-03-18 18:34:05
    [RateCDR] => 1
)
  
[2025-03-18 18:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:34:05' and `end` < '2025-03-18 18:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:34:18] Production.INFO: count ==3826  
[2025-03-18 18:34:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:34:05 - End Time 2025-03-18 18:34:05  
[2025-03-18 18:34:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710022', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710022', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710022', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710022', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:34:19] Production.INFO: ProcessCDR(1,14710022,1,1,2)  
[2025-03-18 18:34:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:34:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:34:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:34:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710022', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:34:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710022', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:34:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:34:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:34:23] Production.INFO: ==25740== Releasing lock...  
[2025-03-18 18:34:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:34:23] Production.INFO: 56.5 MB  #Memory Used#   
[2025-03-18 18:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:35:05
    [end_date_ymd] => 2025-03-18 18:35:05
    [RateCDR] => 1
)
  
[2025-03-18 18:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:35:05' and `end` < '2025-03-18 18:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:35:18] Production.INFO: count ==3817  
[2025-03-18 18:35:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:35:05 - End Time 2025-03-18 18:35:05  
[2025-03-18 18:35:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710027', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710027', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710027', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:35:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710027', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:35:20] Production.INFO: ProcessCDR(1,14710027,1,1,2)  
[2025-03-18 18:35:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:35:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:35:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:35:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710027', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:35:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710027', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:35:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:35:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:35:25] Production.INFO: ==25824== Releasing lock...  
[2025-03-18 18:35:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:35:25] Production.INFO: 56.5 MB  #Memory Used#   
[2025-03-18 18:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:36:05
    [end_date_ymd] => 2025-03-18 18:36:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:36:05' and `end` < '2025-03-18 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-18 18:36:18] Production.INFO: count ==3822  
[2025-03-18 18:36:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:36:05 - End Time 2025-03-18 18:36:05  
[2025-03-18 18:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710032', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710032', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710032', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710032', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:36:20] Production.INFO: ProcessCDR(1,14710032,1,1,2)  
[2025-03-18 18:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:36:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:36:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:36:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710032', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:36:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710032', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:36:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:36:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:36:25] Production.INFO: ==25947== Releasing lock...  
[2025-03-18 18:36:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:36:25] Production.INFO: 56.5 MB  #Memory Used#   
[2025-03-18 18:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:37:05
    [end_date_ymd] => 2025-03-18 18:37:05
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:37:05' and `end` < '2025-03-18 18: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-18 18:37:18] Production.INFO: count ==3829  
[2025-03-18 18:37:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:37:05 - End Time 2025-03-18 18:37:05  
[2025-03-18 18:37:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710037', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710037', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710037', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:37:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710037', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:37:20] Production.INFO: ProcessCDR(1,14710037,1,1,2)  
[2025-03-18 18:37:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:37:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:37:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:37:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:37:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710037', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:37:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710037', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:37:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:37:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:37:25] Production.INFO: ==26073== Releasing lock...  
[2025-03-18 18:37:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:37:25] Production.INFO: 56.5 MB  #Memory Used#   
[2025-03-18 18:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:38:05
    [end_date_ymd] => 2025-03-18 18:38:05
    [RateCDR] => 1
)
  
[2025-03-18 18:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:38:05' and `end` < '2025-03-18 18:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:38:18] Production.INFO: count ==3824  
[2025-03-18 18:38:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:38:05 - End Time 2025-03-18 18:38:05  
[2025-03-18 18:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710042', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710042', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710042', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710042', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:38:19] Production.INFO: ProcessCDR(1,14710042,1,1,2)  
[2025-03-18 18:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:38:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:38:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:38:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710042', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710042', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:38:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:38:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:38:24] Production.INFO: ==26200== Releasing lock...  
[2025-03-18 18:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:38:24] Production.INFO: 56.5 MB  #Memory Used#   
[2025-03-18 18:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:39:05
    [end_date_ymd] => 2025-03-18 18:39:05
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:39:05' and `end` < '2025-03-18 18: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-18 18:39:18] Production.INFO: count ==3796  
[2025-03-18 18:39:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:39:05 - End Time 2025-03-18 18:39:05  
[2025-03-18 18:39:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710047', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710047', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710047', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:39:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710047', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:39:19] Production.INFO: ProcessCDR(1,14710047,1,1,2)  
[2025-03-18 18:39:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:39:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:39:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:39:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710047', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710047', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:39:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:39:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:39:24] Production.INFO: ==26333== Releasing lock...  
[2025-03-18 18:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:39:24] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 18:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:40:06
    [end_date_ymd] => 2025-03-18 18:40:06
    [RateCDR] => 1
)
  
[2025-03-18 18:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:40:06' and `end` < '2025-03-18 18:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:40:19] Production.INFO: count ==3786  
[2025-03-18 18:40:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:40:06 - End Time 2025-03-18 18:40:06  
[2025-03-18 18:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710053', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710053', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710053', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710053', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:40:20] Production.INFO: ProcessCDR(1,14710053,1,1,2)  
[2025-03-18 18:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:40:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710053,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:40:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:40:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710053,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710053', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:40:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710053', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:40:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:40:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:40:25] Production.INFO: ==26463== Releasing lock...  
[2025-03-18 18:40:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:40:25] Production.INFO: 57 MB  #Memory Used#   
[2025-03-18 18:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:41:05
    [end_date_ymd] => 2025-03-18 18:41:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:41:05' and `end` < '2025-03-18 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-18 18:41:18] Production.INFO: count ==3731  
[2025-03-18 18:41:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:41:05 - End Time 2025-03-18 18:41:05  
[2025-03-18 18:41:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710058', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710058', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710058', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:41:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710058', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:41:19] Production.INFO: ProcessCDR(1,14710058,1,1,2)  
[2025-03-18 18:41:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:41:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710058,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:41:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:41:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710058,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710058', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:41:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710058', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:41:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:41:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:41:24] Production.INFO: ==26594== Releasing lock...  
[2025-03-18 18:41:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:41:24] Production.INFO: 55.75 MB  #Memory Used#   
[2025-03-18 18:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:42:05
    [end_date_ymd] => 2025-03-18 18:42:05
    [RateCDR] => 1
)
  
[2025-03-18 18:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:42:05' and `end` < '2025-03-18 18:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:42:18] Production.INFO: count ==3699  
[2025-03-18 18:42:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:42:05 - End Time 2025-03-18 18:42:05  
[2025-03-18 18:42:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710063', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710063', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710063', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710063', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:42:19] Production.INFO: ProcessCDR(1,14710063,1,1,2)  
[2025-03-18 18:42:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:42:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710063,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:42:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:42:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710063,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:42:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710063', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:42:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710063', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:42:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:42:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:42:24] Production.INFO: ==26720== Releasing lock...  
[2025-03-18 18:42:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:42:24] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 18:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:43:06
    [end_date_ymd] => 2025-03-18 18:43:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:43:06' and `end` < '2025-03-18 18: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-18 18:43:18] Production.INFO: count ==3690  
[2025-03-18 18:43:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:43:06 - End Time 2025-03-18 18:43:06  
[2025-03-18 18:43:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710068', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710068', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710068', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:43:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710068', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:43:20] Production.INFO: ProcessCDR(1,14710068,1,1,2)  
[2025-03-18 18:43:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:43:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710068,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:43:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:43:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710068,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710068', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:43:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710068', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:43:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:43:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:43:25] Production.INFO: ==26851== Releasing lock...  
[2025-03-18 18:43:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:43:25] Production.INFO: 55.75 MB  #Memory Used#   
[2025-03-18 18:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:44:05
    [end_date_ymd] => 2025-03-18 18:44:05
    [RateCDR] => 1
)
  
[2025-03-18 18:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:44:05' and `end` < '2025-03-18 18:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:44:18] Production.INFO: count ==3686  
[2025-03-18 18:44:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:44:05 - End Time 2025-03-18 18:44:05  
[2025-03-18 18:44:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710073', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710073', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710073', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710073', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:44:19] Production.INFO: ProcessCDR(1,14710073,1,1,2)  
[2025-03-18 18:44:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:44:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:44:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:44:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710073', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:44:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710073', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:44:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:44:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:44:24] Production.INFO: ==26983== Releasing lock...  
[2025-03-18 18:44:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:44:24] Production.INFO: 56.5 MB  #Memory Used#   
[2025-03-18 18:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:45:05
    [end_date_ymd] => 2025-03-18 18:45:05
    [RateCDR] => 1
)
  
[2025-03-18 18:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:45:05' and `end` < '2025-03-18 18:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:45:18] Production.INFO: count ==3682  
[2025-03-18 18:45:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:45:05 - End Time 2025-03-18 18:45:05  
[2025-03-18 18:45:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710078', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710078', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710078', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:45:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710078', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:45:20] Production.INFO: ProcessCDR(1,14710078,1,1,2)  
[2025-03-18 18:45:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:45:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:45:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:45:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710078', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:45:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710078', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:45:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:45:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:45:25] Production.INFO: ==27109== Releasing lock...  
[2025-03-18 18:45:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:45:25] Production.INFO: 55.75 MB  #Memory Used#   
[2025-03-18 18:46:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:46:06
    [end_date_ymd] => 2025-03-18 18:46:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:46:06' and `end` < '2025-03-18 18: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-18 18:46:19] Production.INFO: count ==3675  
[2025-03-18 18:46:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:46:06 - End Time 2025-03-18 18:46:06  
[2025-03-18 18:46:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710083', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710083', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710083', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:46:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710083', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:46:20] Production.INFO: ProcessCDR(1,14710083,1,1,2)  
[2025-03-18 18:46:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:46:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:46:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:46:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710083', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:46:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710083', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:46:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:46:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:46:25] Production.INFO: ==27237== Releasing lock...  
[2025-03-18 18:46:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:46:25] Production.INFO: 56.25 MB  #Memory Used#   
[2025-03-18 18:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:47:05
    [end_date_ymd] => 2025-03-18 18:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 15:47:05' and `end` < '2025-03-18 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-18 18:47:18] Production.INFO: count ==3655  
[2025-03-18 18:47:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:47:05 - End Time 2025-03-18 18:47:05  
[2025-03-18 18:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710088', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710088', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710088', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710088', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:47:19] Production.INFO: ProcessCDR(1,14710088,1,1,2)  
[2025-03-18 18:47:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:47:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:47:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:47:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710088', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:47:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710088', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:47:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:47:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:47:23] Production.INFO: ==27365== Releasing lock...  
[2025-03-18 18:47:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:47:23] Production.INFO: 55.25 MB  #Memory Used#   
[2025-03-18 18:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:48:05
    [end_date_ymd] => 2025-03-18 18:48:05
    [RateCDR] => 1
)
  
[2025-03-18 18:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:48:05' and `end` < '2025-03-18 18:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:48:18] Production.INFO: count ==3640  
[2025-03-18 18:48:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:48:05 - End Time 2025-03-18 18:48:05  
[2025-03-18 18:48:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710093', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710093', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710093', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710093', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:48:19] Production.INFO: ProcessCDR(1,14710093,1,1,2)  
[2025-03-18 18:48:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:48:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:48:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:48:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710093', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:48:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710093', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:48:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:48:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:48:25] Production.INFO: ==27515== Releasing lock...  
[2025-03-18 18:48:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:48:25] Production.INFO: 55.25 MB  #Memory Used#   
[2025-03-18 18:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:49:05
    [end_date_ymd] => 2025-03-18 18:49:05
    [RateCDR] => 1
)
  
[2025-03-18 18:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:49:05' and `end` < '2025-03-18 18:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:49:18] Production.INFO: count ==3617  
[2025-03-18 18:49:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:49:05 - End Time 2025-03-18 18:49:05  
[2025-03-18 18:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710098', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710098', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710098', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710098', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:49:19] Production.INFO: ProcessCDR(1,14710098,1,1,2)  
[2025-03-18 18:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:49:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:49:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710098', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710098', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:49:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:49:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:49:24] Production.INFO: ==27604== Releasing lock...  
[2025-03-18 18:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:49:24] Production.INFO: 55 MB  #Memory Used#   
[2025-03-18 18:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:50:06
    [end_date_ymd] => 2025-03-18 18:50:06
    [RateCDR] => 1
)
  
[2025-03-18 18:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:50:06' and `end` < '2025-03-18 18:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:50:19] Production.INFO: count ==3603  
[2025-03-18 18:50:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:50:06 - End Time 2025-03-18 18:50:06  
[2025-03-18 18:50:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710104', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710104', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710104', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710104', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:50:20] Production.INFO: ProcessCDR(1,14710104,1,1,2)  
[2025-03-18 18:50:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:50:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710104,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:50:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:50:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710104,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710104', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:50:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710104', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:50:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:50:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:50:25] Production.INFO: ==27696== Releasing lock...  
[2025-03-18 18:50:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:50:25] Production.INFO: 55 MB  #Memory Used#   
[2025-03-18 18:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:51:05
    [end_date_ymd] => 2025-03-18 18:51:05
    [RateCDR] => 1
)
  
[2025-03-18 18:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:51:05' and `end` < '2025-03-18 18:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:51:17] Production.INFO: count ==3522  
[2025-03-18 18:51:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:51:05 - End Time 2025-03-18 18:51:05  
[2025-03-18 18:51:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710109', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710109', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710109', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710109', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:51:19] Production.INFO: ProcessCDR(1,14710109,1,1,2)  
[2025-03-18 18:51:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:51:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710109,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:51:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:51:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710109,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710109', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710109', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:51:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:51:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:51:22] Production.INFO: ==27783== Releasing lock...  
[2025-03-18 18:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:51:22] Production.INFO: 54.75 MB  #Memory Used#   
[2025-03-18 18:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:52:06
    [end_date_ymd] => 2025-03-18 18:52:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:52:06' and `end` < '2025-03-18 18: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-18 18:52:18] Production.INFO: count ==3517  
[2025-03-18 18:52:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:52:06 - End Time 2025-03-18 18:52:06  
[2025-03-18 18:52:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710114', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710114', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710114', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:52:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710114', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:52:20] Production.INFO: ProcessCDR(1,14710114,1,1,2)  
[2025-03-18 18:52:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:52:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710114,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:52:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:52:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710114,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710114', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:52:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710114', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:52:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:52:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:52:25] Production.INFO: ==27875== Releasing lock...  
[2025-03-18 18:52:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:52:25] Production.INFO: 54.25 MB  #Memory Used#   
[2025-03-18 18:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:53:05
    [end_date_ymd] => 2025-03-18 18:53:05
    [RateCDR] => 1
)
  
[2025-03-18 18:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:53:05' and `end` < '2025-03-18 18:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:53:18] Production.INFO: count ==3502  
[2025-03-18 18:53:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:53:05 - End Time 2025-03-18 18:53:05  
[2025-03-18 18:53:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710119', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710119', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710119', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710119', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:53:19] Production.INFO: ProcessCDR(1,14710119,1,1,2)  
[2025-03-18 18:53:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:53:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710119,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:53:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:53:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710119,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710119', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:53:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710119', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:53:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:53:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:53:23] Production.INFO: ==27969== Releasing lock...  
[2025-03-18 18:53:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:53:23] Production.INFO: 54.5 MB  #Memory Used#   
[2025-03-18 18:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:54:06
    [end_date_ymd] => 2025-03-18 18:54:06
    [RateCDR] => 1
)
  
[2025-03-18 18:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:54:06' and `end` < '2025-03-18 18:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:54:18] Production.INFO: count ==3497  
[2025-03-18 18:54:20] Production.ERROR: pbx CDR StartTime 2025-03-18 15:54:06 - End Time 2025-03-18 18:54:06  
[2025-03-18 18:54:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710124', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710124', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710124', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:54:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710124', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:54:20] Production.INFO: ProcessCDR(1,14710124,1,1,2)  
[2025-03-18 18:54:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:54:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:54:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:54:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:54:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710124', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:54:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710124', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:54:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:54:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:54:23] Production.INFO: ==28057== Releasing lock...  
[2025-03-18 18:54:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:54:23] Production.INFO: 54.5 MB  #Memory Used#   
[2025-03-18 18:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:55:05
    [end_date_ymd] => 2025-03-18 18:55:05
    [RateCDR] => 1
)
  
[2025-03-18 18:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:55:05' and `end` < '2025-03-18 18:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:55:18] Production.INFO: count ==3491  
[2025-03-18 18:55:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:55:05 - End Time 2025-03-18 18:55:05  
[2025-03-18 18:55:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710129', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710129', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710129', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710129', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:55:19] Production.INFO: ProcessCDR(1,14710129,1,1,2)  
[2025-03-18 18:55:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:55:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:55:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:55:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710129', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:55:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710129', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:55:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:55:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:55:24] Production.INFO: ==28144== Releasing lock...  
[2025-03-18 18:55:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:55:24] Production.INFO: 54.5 MB  #Memory Used#   
[2025-03-18 18:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:56:06
    [end_date_ymd] => 2025-03-18 18:56:06
    [RateCDR] => 1
)
  
[2025-03-18 18: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-18 15:56:06' and `end` < '2025-03-18 18: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-18 18:56:18] Production.INFO: count ==3475  
[2025-03-18 18:56:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:56:06 - End Time 2025-03-18 18:56:06  
[2025-03-18 18:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710134', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710134', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710134', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710134', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:56:19] Production.INFO: ProcessCDR(1,14710134,1,1,2)  
[2025-03-18 18:56:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:56:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:56:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:56:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710134', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:56:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710134', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:56:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:56:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:56:24] Production.INFO: ==28234== Releasing lock...  
[2025-03-18 18:56:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:56:24] Production.INFO: 54.25 MB  #Memory Used#   
[2025-03-18 18:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:57:05
    [end_date_ymd] => 2025-03-18 18:57:05
    [RateCDR] => 1
)
  
[2025-03-18 18:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:57:05' and `end` < '2025-03-18 18:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:57:18] Production.INFO: count ==3461  
[2025-03-18 18:57:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:57:05 - End Time 2025-03-18 18:57:05  
[2025-03-18 18:57:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710139', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710139', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710139', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710139', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:57:19] Production.INFO: ProcessCDR(1,14710139,1,1,2)  
[2025-03-18 18:57:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:57:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:57:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:57:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710139', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710139', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:57:22] Production.INFO: ==28321== Releasing lock...  
[2025-03-18 18:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:57:22] Production.INFO: 53.75 MB  #Memory Used#   
[2025-03-18 18:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:58:05
    [end_date_ymd] => 2025-03-18 18:58:05
    [RateCDR] => 1
)
  
[2025-03-18 18:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:58:05' and `end` < '2025-03-18 18:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:58:18] Production.INFO: count ==3450  
[2025-03-18 18:58:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:58:05 - End Time 2025-03-18 18:58:05  
[2025-03-18 18:58:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710144', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710144', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710144', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:58:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710144', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:58:19] Production.INFO: ProcessCDR(1,14710144,1,1,2)  
[2025-03-18 18:58:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:58:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:58:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:58:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710144', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710144', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:58:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:58:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:58:24] Production.INFO: ==28406== Releasing lock...  
[2025-03-18 18:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:58:24] Production.INFO: 54.75 MB  #Memory Used#   
[2025-03-18 18:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 15:59:05
    [end_date_ymd] => 2025-03-18 18:59:05
    [RateCDR] => 1
)
  
[2025-03-18 18:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 15:59:05' and `end` < '2025-03-18 18:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 18:59:18] Production.INFO: count ==3437  
[2025-03-18 18:59:19] Production.ERROR: pbx CDR StartTime 2025-03-18 15:59:05 - End Time 2025-03-18 18:59:05  
[2025-03-18 18:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 18:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710146', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710146', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710146', 'tblTempVendorCDR_20' ) start  
[2025-03-18 18:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710146', 'tblTempVendorCDR_20' ) end  
[2025-03-18 18:59:19] Production.INFO: ProcessCDR(1,14710146,1,1,2)  
[2025-03-18 18:59:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:59:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710146,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 18:59:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:59:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710146,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 18:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710146', 'tblTempUsageDetail_20' ) start  
[2025-03-18 18:59:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710146', 'tblTempUsageDetail_20' ) end  
[2025-03-18 18:59:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 18:59:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 18:59:24] Production.INFO: ==28497== Releasing lock...  
[2025-03-18 18:59:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 18:59:24] Production.INFO: 53.75 MB  #Memory Used#   
[2025-03-18 19:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:00:06
    [end_date_ymd] => 2025-03-18 19:00:06
    [RateCDR] => 1
)
  
[2025-03-18 19:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:00:06' and `end` < '2025-03-18 19:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:00:19] Production.INFO: count ==3425  
[2025-03-18 19:00:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:00:06 - End Time 2025-03-18 19:00:06  
[2025-03-18 19:00:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:00:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710154', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710154', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710154', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:00:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710154', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:00:21] Production.INFO: ProcessCDR(1,14710154,1,1,2)  
[2025-03-18 19:00:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:00:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:00:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:00:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710154', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:00:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710154', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:00:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:00:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:00:25] Production.INFO: ==28588== Releasing lock...  
[2025-03-18 19:00:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:00:25] Production.INFO: 54 MB  #Memory Used#   
[2025-03-18 19:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:01:05
    [end_date_ymd] => 2025-03-18 19:01:05
    [RateCDR] => 1
)
  
[2025-03-18 19:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:01:05' and `end` < '2025-03-18 19:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:01:18] Production.INFO: count ==3360  
[2025-03-18 19:01:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:01:05 - End Time 2025-03-18 19:01:05  
[2025-03-18 19:01:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710160', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710160', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710160', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710160', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:01:19] Production.INFO: ProcessCDR(1,14710160,1,1,2)  
[2025-03-18 19:01:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:01:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710160,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:01:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:01:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710160,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710160', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:01:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710160', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:01:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:01:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:01:24] Production.INFO: ==28688== Releasing lock...  
[2025-03-18 19:01:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:01:24] Production.INFO: 53.25 MB  #Memory Used#   
[2025-03-18 19:02:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:02:06
    [end_date_ymd] => 2025-03-18 19:02:06
    [RateCDR] => 1
)
  
[2025-03-18 19:02:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:02:06' and `end` < '2025-03-18 19:02:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:02:19] Production.INFO: count ==3371  
[2025-03-18 19:02:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:02:06 - End Time 2025-03-18 19:02:06  
[2025-03-18 19:02:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710165', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710165', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710165', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:02:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710165', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:02:20] Production.INFO: ProcessCDR(1,14710165,1,1,2)  
[2025-03-18 19:02:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:02:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710165,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:02:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:02:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710165,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710165', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:02:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710165', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:02:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:02:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:02:26] Production.INFO: ==28853== Releasing lock...  
[2025-03-18 19:02:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:02:26] Production.INFO: 53.75 MB  #Memory Used#   
[2025-03-18 19:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:03:05
    [end_date_ymd] => 2025-03-18 19:03:05
    [RateCDR] => 1
)
  
[2025-03-18 19:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:03:05' and `end` < '2025-03-18 19:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:03:18] Production.INFO: count ==3346  
[2025-03-18 19:03:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:03:05 - End Time 2025-03-18 19:03:05  
[2025-03-18 19:03:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710170', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710170', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710170', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:03:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710170', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:03:19] Production.INFO: ProcessCDR(1,14710170,1,1,2)  
[2025-03-18 19:03:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:03:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710170,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:03:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:03:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710170,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710170', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710170', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:03:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:03:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:03:23] Production.INFO: ==28984== Releasing lock...  
[2025-03-18 19:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:03:23] Production.INFO: 53.25 MB  #Memory Used#   
[2025-03-18 19:04:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:04:06
    [end_date_ymd] => 2025-03-18 19:04:06
    [RateCDR] => 1
)
  
[2025-03-18 19:04:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:04:06' and `end` < '2025-03-18 19:04:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:04:19] Production.INFO: count ==3344  
[2025-03-18 19:04:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:04:06 - End Time 2025-03-18 19:04:06  
[2025-03-18 19:04:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710175', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710175', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710175', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:04:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710175', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:04:20] Production.INFO: ProcessCDR(1,14710175,1,1,2)  
[2025-03-18 19:04:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:04:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:04:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:04:26] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710175', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:04:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710175', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:04:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:04:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:04:26] Production.INFO: ==29072== Releasing lock...  
[2025-03-18 19:04:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:04:26] Production.INFO: 53 MB  #Memory Used#   
[2025-03-18 19:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:05:05
    [end_date_ymd] => 2025-03-18 19:05:05
    [RateCDR] => 1
)
  
[2025-03-18 19:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:05:05' and `end` < '2025-03-18 19:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:05:18] Production.INFO: count ==3337  
[2025-03-18 19:05:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:05:05 - End Time 2025-03-18 19:05:05  
[2025-03-18 19:05:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710180', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710180', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710180', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:05:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710180', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:05:20] Production.INFO: ProcessCDR(1,14710180,1,1,2)  
[2025-03-18 19:05:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:05:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:05:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:05:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710180', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:05:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710180', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:05:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:05:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:05:23] Production.INFO: ==29243== Releasing lock...  
[2025-03-18 19:05:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:05:23] Production.INFO: 53 MB  #Memory Used#   
[2025-03-18 19:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:06:06
    [end_date_ymd] => 2025-03-18 19:06:06
    [RateCDR] => 1
)
  
[2025-03-18 19:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:06:06' and `end` < '2025-03-18 19:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:06:19] Production.INFO: count ==3329  
[2025-03-18 19:06:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:06:06 - End Time 2025-03-18 19:06:06  
[2025-03-18 19:06:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710185', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710185', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710185', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:06:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710185', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:06:20] Production.INFO: ProcessCDR(1,14710185,1,1,2)  
[2025-03-18 19:06:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:06:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:06:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:06:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:06:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710185', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:06:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710185', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:06:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:06:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:06:24] Production.INFO: ==29334== Releasing lock...  
[2025-03-18 19:06:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:06:24] Production.INFO: 53 MB  #Memory Used#   
[2025-03-18 19:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:07:06
    [end_date_ymd] => 2025-03-18 19:07:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:07:06' and `end` < '2025-03-18 19: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-18 19:07:18] Production.INFO: count ==3327  
[2025-03-18 19:07:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:07:06 - End Time 2025-03-18 19:07:06  
[2025-03-18 19:07:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710190', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710190', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710190', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:07:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710190', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:07:20] Production.INFO: ProcessCDR(1,14710190,1,1,2)  
[2025-03-18 19:07:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:07:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:07:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:07:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710190', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:07:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710190', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:07:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:07:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:07:25] Production.INFO: ==29424== Releasing lock...  
[2025-03-18 19:07:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:07:25] Production.INFO: 52.75 MB  #Memory Used#   
[2025-03-18 19:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:08:06
    [end_date_ymd] => 2025-03-18 19:08:06
    [RateCDR] => 1
)
  
[2025-03-18 19:08:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:08:06' and `end` < '2025-03-18 19:08:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:08:19] Production.INFO: count ==3307  
[2025-03-18 19:08:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:08:06 - End Time 2025-03-18 19:08:06  
[2025-03-18 19:08:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710195', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710195', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710195', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:08:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710195', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:08:20] Production.INFO: ProcessCDR(1,14710195,1,1,2)  
[2025-03-18 19:08:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:08:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:08:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:08:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:08:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710195', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:08:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710195', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:08:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:08:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:08:26] Production.INFO: ==29524== Releasing lock...  
[2025-03-18 19:08:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:08:26] Production.INFO: 52.75 MB  #Memory Used#   
[2025-03-18 19:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:09:05
    [end_date_ymd] => 2025-03-18 19:09:05
    [RateCDR] => 1
)
  
[2025-03-18 19:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:09:05' and `end` < '2025-03-18 19:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:09:18] Production.INFO: count ==3294  
[2025-03-18 19:09:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:09:05 - End Time 2025-03-18 19:09:05  
[2025-03-18 19:09:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710200', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710200', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710200', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:09:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710200', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:09:19] Production.INFO: ProcessCDR(1,14710200,1,1,2)  
[2025-03-18 19:09:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:09:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:09:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:09:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710200', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:09:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710200', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:09:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:09:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:09:25] Production.INFO: ==29678== Releasing lock...  
[2025-03-18 19:09:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:09:25] Production.INFO: 52.75 MB  #Memory Used#   
[2025-03-18 19:10:08] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:10:08
    [end_date_ymd] => 2025-03-18 19:10:08
    [RateCDR] => 1
)
  
[2025-03-18 19:10:08] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:10:08' and `end` < '2025-03-18 19:10:08'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:10:20] Production.INFO: count ==3285  
[2025-03-18 19:10:21] Production.ERROR: pbx CDR StartTime 2025-03-18 16:10:08 - End Time 2025-03-18 19:10:08  
[2025-03-18 19:10:21] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710206', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710206', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710206', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:10:21] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710206', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:10:21] Production.INFO: ProcessCDR(1,14710206,1,1,2)  
[2025-03-18 19:10:21] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:10:24] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710206,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:10:24] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:10:27] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710206,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710206', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:10:27] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710206', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:10:27] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:10:27] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:10:27] Production.INFO: ==29772== Releasing lock...  
[2025-03-18 19:10:27] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:10:27] Production.INFO: 52.5 MB  #Memory Used#   
[2025-03-18 19:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:11:06
    [end_date_ymd] => 2025-03-18 19:11:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:11:06' and `end` < '2025-03-18 19: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-18 19:11:18] Production.INFO: count ==3252  
[2025-03-18 19:11:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:11:06 - End Time 2025-03-18 19:11:06  
[2025-03-18 19:11:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710211', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710211', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710211', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:11:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710211', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:11:20] Production.INFO: ProcessCDR(1,14710211,1,1,2)  
[2025-03-18 19:11:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:11:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710211,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:11:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:11:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710211,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710211', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:11:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710211', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:11:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:11:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:11:25] Production.INFO: ==29861== Releasing lock...  
[2025-03-18 19:11:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:11:25] Production.INFO: 52.25 MB  #Memory Used#   
[2025-03-18 19:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:12:06
    [end_date_ymd] => 2025-03-18 19:12:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:12:06' and `end` < '2025-03-18 19: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-18 19:12:18] Production.INFO: count ==3237  
[2025-03-18 19:12:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:12:06 - End Time 2025-03-18 19:12:06  
[2025-03-18 19:12:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710216', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710216', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710216', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:12:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710216', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:12:20] Production.INFO: ProcessCDR(1,14710216,1,1,2)  
[2025-03-18 19:12:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:12:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710216,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:12:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:12:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710216,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710216', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:12:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710216', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:12:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:12:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:12:25] Production.INFO: ==30036== Releasing lock...  
[2025-03-18 19:12:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:12:25] Production.INFO: 52.25 MB  #Memory Used#   
[2025-03-18 19:13:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:13:06
    [end_date_ymd] => 2025-03-18 19:13:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:13:06' and `end` < '2025-03-18 19: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-18 19:13:19] Production.INFO: count ==3220  
[2025-03-18 19:13:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:13:06 - End Time 2025-03-18 19:13:06  
[2025-03-18 19:13:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710221', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710221', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710221', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:13:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710221', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:13:20] Production.INFO: ProcessCDR(1,14710221,1,1,2)  
[2025-03-18 19:13:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:13:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710221,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:13:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:13:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710221,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:13:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710221', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:13:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710221', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:13:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:13:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:13:24] Production.INFO: ==30145== Releasing lock...  
[2025-03-18 19:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:13:24] Production.INFO: 52 MB  #Memory Used#   
[2025-03-18 19:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:14:05
    [end_date_ymd] => 2025-03-18 19:14:05
    [RateCDR] => 1
)
  
[2025-03-18 19:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:14:05' and `end` < '2025-03-18 19:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:14:18] Production.INFO: count ==3202  
[2025-03-18 19:14:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:14:05 - End Time 2025-03-18 19:14:05  
[2025-03-18 19:14:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710226', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710226', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710226', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710226', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:14:19] Production.INFO: ProcessCDR(1,14710226,1,1,2)  
[2025-03-18 19:14:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:14:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:14:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:14:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:14:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710226', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:14:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710226', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:14:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:14:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:14:25] Production.INFO: ==30257== Releasing lock...  
[2025-03-18 19:14:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:14:25] Production.INFO: 52 MB  #Memory Used#   
[2025-03-18 19:15:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:15:06
    [end_date_ymd] => 2025-03-18 19:15:06
    [RateCDR] => 1
)
  
[2025-03-18 19:15:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:15:06' and `end` < '2025-03-18 19:15:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:15:19] Production.INFO: count ==3184  
[2025-03-18 19:15:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:15:06 - End Time 2025-03-18 19:15:06  
[2025-03-18 19:15:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710231', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710231', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710231', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:15:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710231', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:15:20] Production.INFO: ProcessCDR(1,14710231,1,1,2)  
[2025-03-18 19:15:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:15:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:15:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:15:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710231', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710231', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:15:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:15:23] Production.INFO: ==30410== Releasing lock...  
[2025-03-18 19:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:15:23] Production.INFO: 52.75 MB  #Memory Used#   
[2025-03-18 19:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:16:05
    [end_date_ymd] => 2025-03-18 19:16:05
    [RateCDR] => 1
)
  
[2025-03-18 19:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:16:05' and `end` < '2025-03-18 19:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:16:18] Production.INFO: count ==3175  
[2025-03-18 19:16:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:16:05 - End Time 2025-03-18 19:16:05  
[2025-03-18 19:16:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710236', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710236', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710236', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710236', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:16:19] Production.INFO: ProcessCDR(1,14710236,1,1,2)  
[2025-03-18 19:16:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:16:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:16:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:16:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:16:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710236', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:16:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710236', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:16:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:16:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:16:23] Production.INFO: ==30559== Releasing lock...  
[2025-03-18 19:16:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:16:23] Production.INFO: 51.75 MB  #Memory Used#   
[2025-03-18 19:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:17:05
    [end_date_ymd] => 2025-03-18 19:17:05
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:17:05' and `end` < '2025-03-18 19: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-18 19:17:18] Production.INFO: count ==3150  
[2025-03-18 19:17:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:17:05 - End Time 2025-03-18 19:17:05  
[2025-03-18 19:17:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710241', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710241', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710241', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:17:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710241', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:17:19] Production.INFO: ProcessCDR(1,14710241,1,1,2)  
[2025-03-18 19:17:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:17:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:17:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710241', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710241', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:17:23] Production.INFO: ==30672== Releasing lock...  
[2025-03-18 19:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:17:23] Production.INFO: 51.5 MB  #Memory Used#   
[2025-03-18 19:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:18:05
    [end_date_ymd] => 2025-03-18 19:18:05
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:18:05' and `end` < '2025-03-18 19:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:18:18] Production.INFO: count ==3158  
[2025-03-18 19:18:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:18:05 - End Time 2025-03-18 19:18:05  
[2025-03-18 19:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710246', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710246', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710246', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710246', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:18:19] Production.INFO: ProcessCDR(1,14710246,1,1,2)  
[2025-03-18 19:18:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:18:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:18:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:18:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710246', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:18:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710246', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:18:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:18:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:18:25] Production.INFO: ==30790== Releasing lock...  
[2025-03-18 19:18:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:18:25] Production.INFO: 52 MB  #Memory Used#   
[2025-03-18 19:19:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:19:06
    [end_date_ymd] => 2025-03-18 19:19:06
    [RateCDR] => 1
)
  
[2025-03-18 19:19:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:19:06' and `end` < '2025-03-18 19:19:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:19:19] Production.INFO: count ==3136  
[2025-03-18 19:19:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:19:06 - End Time 2025-03-18 19:19:06  
[2025-03-18 19:19:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710251', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710251', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710251', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:19:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710251', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:19:20] Production.INFO: ProcessCDR(1,14710251,1,1,2)  
[2025-03-18 19:19:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:19:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:19:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:19:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:19:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710251', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:19:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710251', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:19:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:19:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:19:23] Production.INFO: ==30947== Releasing lock...  
[2025-03-18 19:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:19:23] Production.INFO: 51.5 MB  #Memory Used#   
[2025-03-18 19:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:20:06
    [end_date_ymd] => 2025-03-18 19:20:06
    [RateCDR] => 1
)
  
[2025-03-18 19:20:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:20:06' and `end` < '2025-03-18 19:20:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:20:18] Production.INFO: count ==3123  
[2025-03-18 19:20:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:20:06 - End Time 2025-03-18 19:20:06  
[2025-03-18 19:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710257', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710257', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710257', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710257', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:20:20] Production.INFO: ProcessCDR(1,14710257,1,1,2)  
[2025-03-18 19:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710257,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:20:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710257,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710257', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710257', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:20:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:20:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:20:23] Production.INFO: ==31062== Releasing lock...  
[2025-03-18 19:20:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:20:23] Production.INFO: 51.25 MB  #Memory Used#   
[2025-03-18 19:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:21:06
    [end_date_ymd] => 2025-03-18 19:21:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:21:06' and `end` < '2025-03-18 19: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-18 19:21:19] Production.INFO: count ==3064  
[2025-03-18 19:21:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:21:06 - End Time 2025-03-18 19:21:06  
[2025-03-18 19:21:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710262', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710262', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710262', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:21:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710262', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:21:20] Production.INFO: ProcessCDR(1,14710262,1,1,2)  
[2025-03-18 19:21:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:21:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710262,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:21:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:21:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710262,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710262', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:21:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710262', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:21:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:21:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:21:23] Production.INFO: ==31177== Releasing lock...  
[2025-03-18 19:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:21:23] Production.INFO: 50.75 MB  #Memory Used#   
[2025-03-18 19:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:22:05
    [end_date_ymd] => 2025-03-18 19:22:05
    [RateCDR] => 1
)
  
[2025-03-18 19:22:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:22:05' and `end` < '2025-03-18 19:22:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:22:18] Production.INFO: count ==3057  
[2025-03-18 19:22:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:22:05 - End Time 2025-03-18 19:22:05  
[2025-03-18 19:22:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710267', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710267', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710267', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710267', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:22:19] Production.INFO: ProcessCDR(1,14710267,1,1,2)  
[2025-03-18 19:22:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710267,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710267,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710267', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710267', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:22:23] Production.INFO: ==31297== Releasing lock...  
[2025-03-18 19:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:22:23] Production.INFO: 50.75 MB  #Memory Used#   
[2025-03-18 19:23:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:23:06
    [end_date_ymd] => 2025-03-18 19:23:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:23:06' and `end` < '2025-03-18 19: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-18 19:23:19] Production.INFO: count ==3029  
[2025-03-18 19:23:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:23:06 - End Time 2025-03-18 19:23:06  
[2025-03-18 19:23:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710272', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710272', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710272', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:23:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710272', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:23:20] Production.INFO: ProcessCDR(1,14710272,1,1,2)  
[2025-03-18 19:23:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:23:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710272,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:23:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:23:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710272,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710272', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:23:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710272', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:23:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:23:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:23:25] Production.INFO: ==31408== Releasing lock...  
[2025-03-18 19:23:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:23:25] Production.INFO: 50.5 MB  #Memory Used#   
[2025-03-18 19:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:24:06
    [end_date_ymd] => 2025-03-18 19:24:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:24:06' and `end` < '2025-03-18 19: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-18 19:24:19] Production.INFO: count ==3020  
[2025-03-18 19:24:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:24:06 - End Time 2025-03-18 19:24:06  
[2025-03-18 19:24:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710277', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710277', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710277', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:24:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710277', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:24:20] Production.INFO: ProcessCDR(1,14710277,1,1,2)  
[2025-03-18 19:24:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:24:23] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:24:23] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:24:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:24:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710277', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:24:26] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710277', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:24:26] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:24:26] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:24:26] Production.INFO: ==31521== Releasing lock...  
[2025-03-18 19:24:26] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:24:26] Production.INFO: 51.5 MB  #Memory Used#   
[2025-03-18 19:25:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:25:06
    [end_date_ymd] => 2025-03-18 19:25:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:25:06' and `end` < '2025-03-18 19: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-18 19:25:18] Production.INFO: count ==2997  
[2025-03-18 19:25:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:25:06 - End Time 2025-03-18 19:25:06  
[2025-03-18 19:25:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710282', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710282', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710282', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:25:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710282', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:25:19] Production.INFO: ProcessCDR(1,14710282,1,1,2)  
[2025-03-18 19:25:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:25:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:25:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:25:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710282', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710282', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:25:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:25:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:25:23] Production.INFO: ==31632== Releasing lock...  
[2025-03-18 19:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:25:23] Production.INFO: 50.25 MB  #Memory Used#   
[2025-03-18 19:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:26:06
    [end_date_ymd] => 2025-03-18 19:26:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:26:06' and `end` < '2025-03-18 19: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-18 19:26:19] Production.INFO: count ==2995  
[2025-03-18 19:26:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:26:06 - End Time 2025-03-18 19:26:06  
[2025-03-18 19:26:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710287', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710287', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710287', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:26:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710287', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:26:20] Production.INFO: ProcessCDR(1,14710287,1,1,2)  
[2025-03-18 19:26:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:26:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:26:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:26:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710287', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710287', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:26:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:26:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:26:24] Production.INFO: ==31747== Releasing lock...  
[2025-03-18 19:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:26:24] Production.INFO: 50.5 MB  #Memory Used#   
[2025-03-18 19:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:27:05
    [end_date_ymd] => 2025-03-18 19:27:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 16:27:05' and `end` < '2025-03-18 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-18 19:27:18] Production.INFO: count ==2988  
[2025-03-18 19:27:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:27:05 - End Time 2025-03-18 19:27:05  
[2025-03-18 19:27:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710292', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710292', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710292', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:27:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710292', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:27:19] Production.INFO: ProcessCDR(1,14710292,1,1,2)  
[2025-03-18 19:27:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:27:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:27:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:27:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710292', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:27:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710292', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:27:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:27:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:27:24] Production.INFO: ==31855== Releasing lock...  
[2025-03-18 19:27:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:27:24] Production.INFO: 50.25 MB  #Memory Used#   
[2025-03-18 19:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:28:06
    [end_date_ymd] => 2025-03-18 19:28:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:28:06' and `end` < '2025-03-18 19: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-18 19:28:19] Production.INFO: count ==2969  
[2025-03-18 19:28:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:28:06 - End Time 2025-03-18 19:28:06  
[2025-03-18 19:28:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710297', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710297', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710297', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:28:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710297', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:28:20] Production.INFO: ProcessCDR(1,14710297,1,1,2)  
[2025-03-18 19:28:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:28:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:28:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:28:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710297', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:28:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710297', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:28:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:28:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:28:24] Production.INFO: ==31967== Releasing lock...  
[2025-03-18 19:28:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:28:24] Production.INFO: 49.75 MB  #Memory Used#   
[2025-03-18 19:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:29:06
    [end_date_ymd] => 2025-03-18 19:29:06
    [RateCDR] => 1
)
  
[2025-03-18 19:29:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:29:06' and `end` < '2025-03-18 19:29:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:29:18] Production.INFO: count ==2961  
[2025-03-18 19:29:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:29:06 - End Time 2025-03-18 19:29:06  
[2025-03-18 19:29:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710302', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710302', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710302', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:29:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710302', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:29:20] Production.INFO: ProcessCDR(1,14710302,1,1,2)  
[2025-03-18 19:29:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:29:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:29:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:29:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710302', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:29:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710302', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:29:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:29:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:29:23] Production.INFO: ==32075== Releasing lock...  
[2025-03-18 19:29:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:29:23] Production.INFO: 49.75 MB  #Memory Used#   
[2025-03-18 19:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:30:06
    [end_date_ymd] => 2025-03-18 19:30:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:30:06' and `end` < '2025-03-18 19: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-18 19:30:19] Production.INFO: count ==2927  
[2025-03-18 19:30:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:30:06 - End Time 2025-03-18 19:30:06  
[2025-03-18 19:30:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710307', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710307', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710307', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:30:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710307', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:30:20] Production.INFO: ProcessCDR(1,14710307,1,1,2)  
[2025-03-18 19:30:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:30:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:30:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:30:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710307', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710307', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:30:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:30:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:30:24] Production.INFO: ==32193== Releasing lock...  
[2025-03-18 19:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:30:24] Production.INFO: 49.75 MB  #Memory Used#   
[2025-03-18 19:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:31:05
    [end_date_ymd] => 2025-03-18 19:31:05
    [RateCDR] => 1
)
  
[2025-03-18 19:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:31:05' and `end` < '2025-03-18 19:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:31:18] Production.INFO: count ==2833  
[2025-03-18 19:31:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:31:05 - End Time 2025-03-18 19:31:05  
[2025-03-18 19:31:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710313', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710313', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710313', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:31:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710313', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:31:19] Production.INFO: ProcessCDR(1,14710313,1,1,2)  
[2025-03-18 19:31:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:31:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710313,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:31:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:31:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710313,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:31:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710313', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:31:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710313', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:31:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:31:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:31:25] Production.INFO: ==32307== Releasing lock...  
[2025-03-18 19:31:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:31:25] Production.INFO: 49.25 MB  #Memory Used#   
[2025-03-18 19:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:32:06
    [end_date_ymd] => 2025-03-18 19:32:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:32:06' and `end` < '2025-03-18 19: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-18 19:32:19] Production.INFO: count ==2808  
[2025-03-18 19:32:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:32:06 - End Time 2025-03-18 19:32:06  
[2025-03-18 19:32:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710318', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710318', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710318', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:32:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710318', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:32:20] Production.INFO: ProcessCDR(1,14710318,1,1,2)  
[2025-03-18 19:32:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:32:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710318,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:32:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:32:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710318,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710318', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:32:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710318', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:32:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:32:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:32:25] Production.INFO: ==32421== Releasing lock...  
[2025-03-18 19:32:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:32:25] Production.INFO: 49.25 MB  #Memory Used#   
[2025-03-18 19:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:33:06
    [end_date_ymd] => 2025-03-18 19:33:06
    [RateCDR] => 1
)
  
[2025-03-18 19:33:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:33:06' and `end` < '2025-03-18 19:33:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:33:18] Production.INFO: count ==2804  
[2025-03-18 19:33:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:33:06 - End Time 2025-03-18 19:33:06  
[2025-03-18 19:33:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710323', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710323', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710323', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:33:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710323', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:33:19] Production.INFO: ProcessCDR(1,14710323,1,1,2)  
[2025-03-18 19:33:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:33:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710323,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:33:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:33:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710323,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710323', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:33:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710323', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:33:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:33:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:33:24] Production.INFO: ==32531== Releasing lock...  
[2025-03-18 19:33:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:33:24] Production.INFO: 49 MB  #Memory Used#   
[2025-03-18 19:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:34:05
    [end_date_ymd] => 2025-03-18 19:34:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 16:34:05' and `end` < '2025-03-18 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-18 19:34:18] Production.INFO: count ==2792  
[2025-03-18 19:34:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:34:05 - End Time 2025-03-18 19:34:05  
[2025-03-18 19:34:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710328', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710328', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710328', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710328', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:34:19] Production.INFO: ProcessCDR(1,14710328,1,1,2)  
[2025-03-18 19:34:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:34:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:34:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:34:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710328', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:34:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710328', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:34:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:34:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:34:24] Production.INFO: ==32664== Releasing lock...  
[2025-03-18 19:34:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:34:24] Production.INFO: 49 MB  #Memory Used#   
[2025-03-18 19:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:35:05
    [end_date_ymd] => 2025-03-18 19:35:05
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:35:05' and `end` < '2025-03-18 19: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-18 19:35:17] Production.INFO: count ==2782  
[2025-03-18 19:35:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:35:05 - End Time 2025-03-18 19:35:05  
[2025-03-18 19:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710333', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710333', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710333', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710333', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:35:18] Production.INFO: ProcessCDR(1,14710333,1,1,2)  
[2025-03-18 19:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:35:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:35:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:35:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710333', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710333', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:35:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:35:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:35:22] Production.INFO: ==32753== Releasing lock...  
[2025-03-18 19:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:35:22] Production.INFO: 49 MB  #Memory Used#   
[2025-03-18 19:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:36:06
    [end_date_ymd] => 2025-03-18 19:36:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:36:06' and `end` < '2025-03-18 19: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-18 19:36:19] Production.INFO: count ==2769  
[2025-03-18 19:36:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:36:06 - End Time 2025-03-18 19:36:06  
[2025-03-18 19:36:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710338', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710338', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710338', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:36:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710338', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:36:20] Production.INFO: ProcessCDR(1,14710338,1,1,2)  
[2025-03-18 19:36:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:36:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:36:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:36:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:36:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710338', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:36:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710338', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:36:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:36:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:36:24] Production.INFO: ==398== Releasing lock...  
[2025-03-18 19:36:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:36:24] Production.INFO: 48.75 MB  #Memory Used#   
[2025-03-18 19:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:37:05
    [end_date_ymd] => 2025-03-18 19:37:05
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:37:05' and `end` < '2025-03-18 19: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-18 19:37:17] Production.INFO: count ==2753  
[2025-03-18 19:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:37:05 - End Time 2025-03-18 19:37:05  
[2025-03-18 19:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710343', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710343', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710343', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710343', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:37:18] Production.INFO: ProcessCDR(1,14710343,1,1,2)  
[2025-03-18 19:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710343', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710343', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:37:22] Production.INFO: ==483== Releasing lock...  
[2025-03-18 19:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:37:22] Production.INFO: 48.75 MB  #Memory Used#   
[2025-03-18 19:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:38:05
    [end_date_ymd] => 2025-03-18 19:38:05
    [RateCDR] => 1
)
  
[2025-03-18 19:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:38:05' and `end` < '2025-03-18 19:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:38:18] Production.INFO: count ==2715  
[2025-03-18 19:38:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:38:05 - End Time 2025-03-18 19:38:05  
[2025-03-18 19:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710348', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710348', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710348', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710348', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:38:19] Production.INFO: ProcessCDR(1,14710348,1,1,2)  
[2025-03-18 19:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:38:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:38:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:38:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710348', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710348', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:38:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:38:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:38:24] Production.INFO: ==576== Releasing lock...  
[2025-03-18 19:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:38:24] Production.INFO: 48.5 MB  #Memory Used#   
[2025-03-18 19:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:39:05
    [end_date_ymd] => 2025-03-18 19:39:05
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:39:05' and `end` < '2025-03-18 19: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-18 19:39:17] Production.INFO: count ==2677  
[2025-03-18 19:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:39:05 - End Time 2025-03-18 19:39:05  
[2025-03-18 19:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710353', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710353', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710353', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710353', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:39:18] Production.INFO: ProcessCDR(1,14710353,1,1,2)  
[2025-03-18 19:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:39:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:39:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:39:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:39:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710353', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:39:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710353', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:39:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:39:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:39:24] Production.INFO: ==684== Releasing lock...  
[2025-03-18 19:39:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:39:24] Production.INFO: 48.25 MB  #Memory Used#   
[2025-03-18 19:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:40:06
    [end_date_ymd] => 2025-03-18 19:40:06
    [RateCDR] => 1
)
  
[2025-03-18 19:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:40:06' and `end` < '2025-03-18 19:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:40:19] Production.INFO: count ==2667  
[2025-03-18 19:40:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:40:06 - End Time 2025-03-18 19:40:06  
[2025-03-18 19:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710359', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710359', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710359', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710359', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:40:20] Production.INFO: ProcessCDR(1,14710359,1,1,2)  
[2025-03-18 19:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710359,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710359,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710359', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710359', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:40:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:40:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:40:23] Production.INFO: ==788== Releasing lock...  
[2025-03-18 19:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:40:23] Production.INFO: 48 MB  #Memory Used#   
[2025-03-18 19:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:41:05
    [end_date_ymd] => 2025-03-18 19:41:05
    [RateCDR] => 1
)
  
[2025-03-18 19:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:41:05' and `end` < '2025-03-18 19:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:41:17] Production.INFO: count ==2554  
[2025-03-18 19:41:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:41:05 - End Time 2025-03-18 19:41:05  
[2025-03-18 19:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710364', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710364', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710364', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710364', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:41:18] Production.INFO: ProcessCDR(1,14710364,1,1,2)  
[2025-03-18 19:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710364,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:41:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710364,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:41:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710364', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:41:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710364', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:41:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:41:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:41:22] Production.INFO: ==879== Releasing lock...  
[2025-03-18 19:41:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:41:22] Production.INFO: 47.25 MB  #Memory Used#   
[2025-03-18 19:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:42:06
    [end_date_ymd] => 2025-03-18 19:42:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:42:06' and `end` < '2025-03-18 19: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-18 19:42:18] Production.INFO: count ==2530  
[2025-03-18 19:42:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:42:06 - End Time 2025-03-18 19:42:06  
[2025-03-18 19:42:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710369', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710369', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710369', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:42:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710369', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:42:19] Production.INFO: ProcessCDR(1,14710369,1,1,2)  
[2025-03-18 19:42:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:42:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710369,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:42:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:42:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710369,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:42:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710369', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:42:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710369', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:42:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:42:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:42:23] Production.INFO: ==976== Releasing lock...  
[2025-03-18 19:42:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:42:23] Production.INFO: 47.25 MB  #Memory Used#   
[2025-03-18 19:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:43:06
    [end_date_ymd] => 2025-03-18 19:43:06
    [RateCDR] => 1
)
  
[2025-03-18 19:43:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:43:06' and `end` < '2025-03-18 19:43:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:43:18] Production.INFO: count ==2516  
[2025-03-18 19:43:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:43:06 - End Time 2025-03-18 19:43:06  
[2025-03-18 19:43:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710374', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710374', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710374', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:43:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710374', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:43:19] Production.INFO: ProcessCDR(1,14710374,1,1,2)  
[2025-03-18 19:43:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:43:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710374,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:43:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:43:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710374,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710374', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710374', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:43:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:43:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:43:23] Production.INFO: ==1066== Releasing lock...  
[2025-03-18 19:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:43:23] Production.INFO: 47 MB  #Memory Used#   
[2025-03-18 19:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:44:06
    [end_date_ymd] => 2025-03-18 19:44:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:44:06' and `end` < '2025-03-18 19: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-18 19:44:18] Production.INFO: count ==2508  
[2025-03-18 19:44:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:44:06 - End Time 2025-03-18 19:44:06  
[2025-03-18 19:44:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710379', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710379', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710379', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:44:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710379', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:44:19] Production.INFO: ProcessCDR(1,14710379,1,1,2)  
[2025-03-18 19:44:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:44:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:44:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:44:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710379', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710379', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:44:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:44:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:44:23] Production.INFO: ==1155== Releasing lock...  
[2025-03-18 19:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:44:23] Production.INFO: 47 MB  #Memory Used#   
[2025-03-18 19:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:45:06
    [end_date_ymd] => 2025-03-18 19:45:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:45:06' and `end` < '2025-03-18 19: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-18 19:45:19] Production.INFO: count ==2494  
[2025-03-18 19:45:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:45:06 - End Time 2025-03-18 19:45:06  
[2025-03-18 19:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710384', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710384', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710384', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710384', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:45:19] Production.INFO: ProcessCDR(1,14710384,1,1,2)  
[2025-03-18 19:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:45:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:45:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:45:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:45:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710384', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:45:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710384', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:45:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:45:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:45:23] Production.INFO: ==1261== Releasing lock...  
[2025-03-18 19:45:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:45:23] Production.INFO: 46.75 MB  #Memory Used#   
[2025-03-18 19:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:46:05
    [end_date_ymd] => 2025-03-18 19:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 16:46:05' and `end` < '2025-03-18 19:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:46:18] Production.INFO: count ==2465  
[2025-03-18 19:46:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:46:05 - End Time 2025-03-18 19:46:05  
[2025-03-18 19:46:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710389', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710389', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710389', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:46:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710389', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:46:19] Production.INFO: ProcessCDR(1,14710389,1,1,2)  
[2025-03-18 19:46:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:46:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:46:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:46:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710389', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710389', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:46:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:46:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:46:22] Production.INFO: ==1351== Releasing lock...  
[2025-03-18 19:46:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:46:22] Production.INFO: 46.5 MB  #Memory Used#   
[2025-03-18 19:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:47:06
    [end_date_ymd] => 2025-03-18 19:47:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:47:06' and `end` < '2025-03-18 19: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-18 19:47:18] Production.INFO: count ==2449  
[2025-03-18 19:47:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:47:06 - End Time 2025-03-18 19:47:06  
[2025-03-18 19:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710394', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710394', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710394', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710394', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:47:19] Production.INFO: ProcessCDR(1,14710394,1,1,2)  
[2025-03-18 19:47:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:47:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:47:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:47:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710394', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:47:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710394', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:47:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:47:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:47:24] Production.INFO: ==1440== Releasing lock...  
[2025-03-18 19:47:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:47:24] Production.INFO: 46.5 MB  #Memory Used#   
[2025-03-18 19:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:48:05
    [end_date_ymd] => 2025-03-18 19:48:05
    [RateCDR] => 1
)
  
[2025-03-18 19:48:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:48:05' and `end` < '2025-03-18 19:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:48:17] Production.INFO: count ==2441  
[2025-03-18 19:48:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:48:05 - End Time 2025-03-18 19:48:05  
[2025-03-18 19:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710399', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710399', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710399', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710399', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:48:18] Production.INFO: ProcessCDR(1,14710399,1,1,2)  
[2025-03-18 19:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:48:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:48:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:48:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710399', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710399', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:48:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:48:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:48:23] Production.INFO: ==1563== Releasing lock...  
[2025-03-18 19:48:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:48:23] Production.INFO: 46.5 MB  #Memory Used#   
[2025-03-18 19:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:49:06
    [end_date_ymd] => 2025-03-18 19:49:06
    [RateCDR] => 1
)
  
[2025-03-18 19:49:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:49:06' and `end` < '2025-03-18 19:49:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:49:18] Production.INFO: count ==2438  
[2025-03-18 19:49:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:49:06 - End Time 2025-03-18 19:49:06  
[2025-03-18 19:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710404', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710404', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710404', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710404', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:49:19] Production.INFO: ProcessCDR(1,14710404,1,1,2)  
[2025-03-18 19:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:49:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:49:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:49:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710404', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:49:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710404', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:49:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:49:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:49:24] Production.INFO: ==1666== Releasing lock...  
[2025-03-18 19:49:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:49:24] Production.INFO: 46.25 MB  #Memory Used#   
[2025-03-18 19:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:50:06
    [end_date_ymd] => 2025-03-18 19:50:06
    [RateCDR] => 1
)
  
[2025-03-18 19:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:50:06' and `end` < '2025-03-18 19:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:50:19] Production.INFO: count ==2410  
[2025-03-18 19:50:20] Production.ERROR: pbx CDR StartTime 2025-03-18 16:50:06 - End Time 2025-03-18 19:50:06  
[2025-03-18 19:50:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710410', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710410', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710410', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:50:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710410', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:50:20] Production.INFO: ProcessCDR(1,14710410,1,1,2)  
[2025-03-18 19:50:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:50:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710410,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:50:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:50:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710410,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:50:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710410', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710410', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:50:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:50:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:50:24] Production.INFO: ==1794== Releasing lock...  
[2025-03-18 19:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:50:24] Production.INFO: 46.25 MB  #Memory Used#   
[2025-03-18 19:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:51:06
    [end_date_ymd] => 2025-03-18 19:51:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:51:06' and `end` < '2025-03-18 19: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-18 19:51:18] Production.INFO: count ==2316  
[2025-03-18 19:51:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:51:06 - End Time 2025-03-18 19:51:06  
[2025-03-18 19:51:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710415', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710415', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710415', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:51:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710415', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:51:19] Production.INFO: ProcessCDR(1,14710415,1,1,2)  
[2025-03-18 19:51:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:51:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710415,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:51:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:51:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710415,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710415', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710415', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:51:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:51:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:51:23] Production.INFO: ==1877== Releasing lock...  
[2025-03-18 19:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:51:23] Production.INFO: 45.5 MB  #Memory Used#   
[2025-03-18 19:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:52:05
    [end_date_ymd] => 2025-03-18 19:52:05
    [RateCDR] => 1
)
  
[2025-03-18 19:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:52:05' and `end` < '2025-03-18 19:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:52:18] Production.INFO: count ==2288  
[2025-03-18 19:52:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:52:05 - End Time 2025-03-18 19:52:05  
[2025-03-18 19:52:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710420', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710420', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710420', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:52:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710420', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:52:19] Production.INFO: ProcessCDR(1,14710420,1,1,2)  
[2025-03-18 19:52:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:52:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710420,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:52:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710420,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710420', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710420', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:52:22] Production.INFO: ==1950== Releasing lock...  
[2025-03-18 19:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:52:22] Production.INFO: 45.25 MB  #Memory Used#   
[2025-03-18 19:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:53:05
    [end_date_ymd] => 2025-03-18 19:53:05
    [RateCDR] => 1
)
  
[2025-03-18 19:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:53:05' and `end` < '2025-03-18 19:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:53:18] Production.INFO: count ==2278  
[2025-03-18 19:53:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:53:05 - End Time 2025-03-18 19:53:05  
[2025-03-18 19:53:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710425', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710425', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710425', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710425', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:53:19] Production.INFO: ProcessCDR(1,14710425,1,1,2)  
[2025-03-18 19:53:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:53:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710425,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:53:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710425,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710425', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710425', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:53:22] Production.INFO: ==2026== Releasing lock...  
[2025-03-18 19:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:53:22] Production.INFO: 45.25 MB  #Memory Used#   
[2025-03-18 19:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:54:05
    [end_date_ymd] => 2025-03-18 19:54:05
    [RateCDR] => 1
)
  
[2025-03-18 19:54:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:54:05' and `end` < '2025-03-18 19:54:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:54:17] Production.INFO: count ==2282  
[2025-03-18 19:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:54:05 - End Time 2025-03-18 19:54:05  
[2025-03-18 19:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710430', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710430', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710430', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710430', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:54:18] Production.INFO: ProcessCDR(1,14710430,1,1,2)  
[2025-03-18 19:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:54:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710430,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:54:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:54:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710430,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:54:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710430', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:54:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710430', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:54:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:54:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:54:23] Production.INFO: ==2097== Releasing lock...  
[2025-03-18 19:54:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:54:23] Production.INFO: 45.25 MB  #Memory Used#   
[2025-03-18 19:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:55:06
    [end_date_ymd] => 2025-03-18 19:55:06
    [RateCDR] => 1
)
  
[2025-03-18 19:55:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:55:06' and `end` < '2025-03-18 19:55:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:55:19] Production.INFO: count ==2269  
[2025-03-18 19:55:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:55:06 - End Time 2025-03-18 19:55:06  
[2025-03-18 19:55:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710435', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710435', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710435', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:55:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710435', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:55:19] Production.INFO: ProcessCDR(1,14710435,1,1,2)  
[2025-03-18 19:55:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:55:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:55:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:55:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:55:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710435', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:55:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710435', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:55:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:55:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:55:23] Production.INFO: ==2171== Releasing lock...  
[2025-03-18 19:55:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:55:23] Production.INFO: 45 MB  #Memory Used#   
[2025-03-18 19:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:56:05
    [end_date_ymd] => 2025-03-18 19:56:05
    [RateCDR] => 1
)
  
[2025-03-18 19:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:56:05' and `end` < '2025-03-18 19:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:56:18] Production.INFO: count ==2251  
[2025-03-18 19:56:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:56:05 - End Time 2025-03-18 19:56:05  
[2025-03-18 19:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710440', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710440', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710440', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710440', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:56:18] Production.INFO: ProcessCDR(1,14710440,1,1,2)  
[2025-03-18 19:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:56:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:56:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:56:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710440', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710440', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:56:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:56:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:56:22] Production.INFO: ==2248== Releasing lock...  
[2025-03-18 19:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:56:22] Production.INFO: 45 MB  #Memory Used#   
[2025-03-18 19:57:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:57:06
    [end_date_ymd] => 2025-03-18 19:57:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:57:06' and `end` < '2025-03-18 19: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-18 19:57:18] Production.INFO: count ==2234  
[2025-03-18 19:57:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:57:06 - End Time 2025-03-18 19:57:06  
[2025-03-18 19:57:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710445', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710445', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710445', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:57:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710445', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:57:19] Production.INFO: ProcessCDR(1,14710445,1,1,2)  
[2025-03-18 19:57:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:57:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:57:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:57:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710445', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:57:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710445', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:57:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:57:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:57:23] Production.INFO: ==2323== Releasing lock...  
[2025-03-18 19:57:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:57:23] Production.INFO: 44.75 MB  #Memory Used#   
[2025-03-18 19:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:58:05
    [end_date_ymd] => 2025-03-18 19:58:05
    [RateCDR] => 1
)
  
[2025-03-18 19:58:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 16:58:05' and `end` < '2025-03-18 19:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 19:58:18] Production.INFO: count ==2224  
[2025-03-18 19:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 16:58:05 - End Time 2025-03-18 19:58:05  
[2025-03-18 19:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710450', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710450', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710450', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710450', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:58:18] Production.INFO: ProcessCDR(1,14710450,1,1,2)  
[2025-03-18 19:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:58:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:58:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:58:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710450', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:58:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710450', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:58:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:58:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:58:24] Production.INFO: ==2398== Releasing lock...  
[2025-03-18 19:58:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:58:24] Production.INFO: 44.75 MB  #Memory Used#   
[2025-03-18 19:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 16:59:06
    [end_date_ymd] => 2025-03-18 19:59:06
    [RateCDR] => 1
)
  
[2025-03-18 19: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-18 16:59:06' and `end` < '2025-03-18 19: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-18 19:59:18] Production.INFO: count ==2220  
[2025-03-18 19:59:19] Production.ERROR: pbx CDR StartTime 2025-03-18 16:59:06 - End Time 2025-03-18 19:59:06  
[2025-03-18 19:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 19:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710455', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710455', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710455', 'tblTempVendorCDR_20' ) start  
[2025-03-18 19:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710455', 'tblTempVendorCDR_20' ) end  
[2025-03-18 19:59:19] Production.INFO: ProcessCDR(1,14710455,1,1,2)  
[2025-03-18 19:59:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:59:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 19:59:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:59:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 19:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710455', 'tblTempUsageDetail_20' ) start  
[2025-03-18 19:59:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710455', 'tblTempUsageDetail_20' ) end  
[2025-03-18 19:59:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 19:59:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 19:59:23] Production.INFO: ==2468== Releasing lock...  
[2025-03-18 19:59:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 19:59:23] Production.INFO: 44.75 MB  #Memory Used#   
[2025-03-18 20:00:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:00:05
    [end_date_ymd] => 2025-03-18 20:00:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:00:05' and `end` < '2025-03-18 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-18 20:00:18] Production.INFO: count ==2180  
[2025-03-18 20:00:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:00:05 - End Time 2025-03-18 20:00:05  
[2025-03-18 20:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710460', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710460', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710460', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710460', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:00:19] Production.INFO: ProcessCDR(1,14710460,1,1,2)  
[2025-03-18 20:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:00:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710460', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710460', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:00:23] Production.INFO: ==2552== Releasing lock...  
[2025-03-18 20:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:00:23] Production.INFO: 44.5 MB  #Memory Used#   
[2025-03-18 20:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:01:06
    [end_date_ymd] => 2025-03-18 20:01:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:01:06' and `end` < '2025-03-18 20: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-18 20:01:18] Production.INFO: count ==2133  
[2025-03-18 20:01:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:01:06 - End Time 2025-03-18 20:01:06  
[2025-03-18 20:01:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710466', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710466', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710466', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:01:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710466', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:01:19] Production.INFO: ProcessCDR(1,14710466,1,1,2)  
[2025-03-18 20:01:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:01:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710466,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:01:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710466,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710466', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:01:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710466', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:01:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:01:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:01:23] Production.INFO: ==2686== Releasing lock...  
[2025-03-18 20:01:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:01:23] Production.INFO: 44 MB  #Memory Used#   
[2025-03-18 20:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:02:05
    [end_date_ymd] => 2025-03-18 20:02:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:02:05' and `end` < '2025-03-18 20: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-18 20:02:18] Production.INFO: count ==2127  
[2025-03-18 20:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:02:05 - End Time 2025-03-18 20:02:05  
[2025-03-18 20:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710471', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710471', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710471', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710471', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:02:18] Production.INFO: ProcessCDR(1,14710471,1,1,2)  
[2025-03-18 20:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710471,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:02:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710471,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:02:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710471', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:02:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710471', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:02:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:02:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:02:24] Production.INFO: ==2766== Releasing lock...  
[2025-03-18 20:02:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:02:24] Production.INFO: 44 MB  #Memory Used#   
[2025-03-18 20:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:03:05
    [end_date_ymd] => 2025-03-18 20:03:05
    [RateCDR] => 1
)
  
[2025-03-18 20:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:03:05' and `end` < '2025-03-18 20:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:03:17] Production.INFO: count ==2129  
[2025-03-18 20:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:03:05 - End Time 2025-03-18 20:03:05  
[2025-03-18 20:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710476', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710476', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710476', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710476', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:03:18] Production.INFO: ProcessCDR(1,14710476,1,1,2)  
[2025-03-18 20:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710476,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710476,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710476', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710476', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:03:22] Production.INFO: ==2843== Releasing lock...  
[2025-03-18 20:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:03:22] Production.INFO: 44 MB  #Memory Used#   
[2025-03-18 20:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:04:05
    [end_date_ymd] => 2025-03-18 20:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:04:05' and `end` < '2025-03-18 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-18 20:04:17] Production.INFO: count ==2123  
[2025-03-18 20:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:04:05 - End Time 2025-03-18 20:04:05  
[2025-03-18 20:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710481', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710481', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710481', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710481', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:04:18] Production.INFO: ProcessCDR(1,14710481,1,1,2)  
[2025-03-18 20:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710481', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710481', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:04:22] Production.INFO: ==2916== Releasing lock...  
[2025-03-18 20:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:04:22] Production.INFO: 44 MB  #Memory Used#   
[2025-03-18 20:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:05:06
    [end_date_ymd] => 2025-03-18 20:05:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:05:06' and `end` < '2025-03-18 20: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-18 20:05:18] Production.INFO: count ==2105  
[2025-03-18 20:05:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:05:06 - End Time 2025-03-18 20:05:06  
[2025-03-18 20:05:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710486', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710486', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710486', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:05:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710486', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:05:19] Production.INFO: ProcessCDR(1,14710486,1,1,2)  
[2025-03-18 20:05:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:05:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:05:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:05:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710486', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:05:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710486', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:05:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:05:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:05:24] Production.INFO: ==3028== Releasing lock...  
[2025-03-18 20:05:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:05:24] Production.INFO: 43.75 MB  #Memory Used#   
[2025-03-18 20:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:06:06
    [end_date_ymd] => 2025-03-18 20:06:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:06:06' and `end` < '2025-03-18 20: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-18 20:06:19] Production.INFO: count ==2093  
[2025-03-18 20:06:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:06:06 - End Time 2025-03-18 20:06:06  
[2025-03-18 20:06:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710491', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710491', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710491', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:06:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710491', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:06:19] Production.INFO: ProcessCDR(1,14710491,1,1,2)  
[2025-03-18 20:06:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:06:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:06:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:06:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710491', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:06:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710491', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:06:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:06:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:06:25] Production.INFO: ==3101== Releasing lock...  
[2025-03-18 20:06:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:06:25] Production.INFO: 43.5 MB  #Memory Used#   
[2025-03-18 20:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:07:05
    [end_date_ymd] => 2025-03-18 20:07:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:07:05' and `end` < '2025-03-18 20: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-18 20:07:18] Production.INFO: count ==2082  
[2025-03-18 20:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:07:05 - End Time 2025-03-18 20:07:05  
[2025-03-18 20:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710496', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710496', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710496', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710496', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:07:19] Production.INFO: ProcessCDR(1,14710496,1,1,2)  
[2025-03-18 20:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:07:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:07:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710496', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710496', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:07:24] Production.INFO: ==3174== Releasing lock...  
[2025-03-18 20:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:07:24] Production.INFO: 43.75 MB  #Memory Used#   
[2025-03-18 20:08:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:08:06
    [end_date_ymd] => 2025-03-18 20:08:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:08:06' and `end` < '2025-03-18 20: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-18 20:08:18] Production.INFO: count ==2077  
[2025-03-18 20:08:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:08:06 - End Time 2025-03-18 20:08:06  
[2025-03-18 20:08:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710501', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710501', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710501', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:08:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710501', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:08:19] Production.INFO: ProcessCDR(1,14710501,1,1,2)  
[2025-03-18 20:08:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:08:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:08:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:08:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:08:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710501', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:08:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710501', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:08:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:08:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:08:23] Production.INFO: ==3250== Releasing lock...  
[2025-03-18 20:08:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:08:23] Production.INFO: 43.5 MB  #Memory Used#   
[2025-03-18 20:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:09:05
    [end_date_ymd] => 2025-03-18 20:09:05
    [RateCDR] => 1
)
  
[2025-03-18 20:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:09:05' and `end` < '2025-03-18 20:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:09:18] Production.INFO: count ==2071  
[2025-03-18 20:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:09:05 - End Time 2025-03-18 20:09:05  
[2025-03-18 20:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710506', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710506', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710506', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710506', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:09:18] Production.INFO: ProcessCDR(1,14710506,1,1,2)  
[2025-03-18 20:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:09:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:09:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:09:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710506', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710506', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:09:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:09:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:09:22] Production.INFO: ==3319== Releasing lock...  
[2025-03-18 20:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:09:22] Production.INFO: 43.25 MB  #Memory Used#   
[2025-03-18 20:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:10:06
    [end_date_ymd] => 2025-03-18 20:10:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:10:06' and `end` < '2025-03-18 20: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-18 20:10:19] Production.INFO: count ==2064  
[2025-03-18 20:10:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:10:06 - End Time 2025-03-18 20:10:06  
[2025-03-18 20:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710511', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710511', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710511', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:10:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710511', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:10:20] Production.INFO: ProcessCDR(1,14710511,1,1,2)  
[2025-03-18 20:10:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:10:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:10:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:10:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710511', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710511', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:10:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:10:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:10:23] Production.INFO: ==3396== Releasing lock...  
[2025-03-18 20:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:10:23] Production.INFO: 43.25 MB  #Memory Used#   
[2025-03-18 20:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:11:05
    [end_date_ymd] => 2025-03-18 20:11:05
    [RateCDR] => 1
)
  
[2025-03-18 20:11:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:11:05' and `end` < '2025-03-18 20:11:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:11:18] Production.INFO: count ==2015  
[2025-03-18 20:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:11:05 - End Time 2025-03-18 20:11:05  
[2025-03-18 20:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710517', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710517', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710517', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710517', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:11:18] Production.INFO: ProcessCDR(1,14710517,1,1,2)  
[2025-03-18 20:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:11:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710517,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:11:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:11:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710517,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710517', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:11:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710517', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:11:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:11:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:11:22] Production.INFO: ==3475== Releasing lock...  
[2025-03-18 20:11:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:11:22] Production.INFO: 43 MB  #Memory Used#   
[2025-03-18 20:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:12:06
    [end_date_ymd] => 2025-03-18 20:12:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:12:06' and `end` < '2025-03-18 20: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-18 20:12:18] Production.INFO: count ==2010  
[2025-03-18 20:12:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:12:06 - End Time 2025-03-18 20:12:06  
[2025-03-18 20:12:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710522', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710522', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710522', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:12:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710522', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:12:19] Production.INFO: ProcessCDR(1,14710522,1,1,2)  
[2025-03-18 20:12:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:12:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710522,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:12:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:12:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710522,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710522', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710522', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:12:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:12:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:12:23] Production.INFO: ==3545== Releasing lock...  
[2025-03-18 20:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:12:23] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 20:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:13:05
    [end_date_ymd] => 2025-03-18 20:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:13:05' and `end` < '2025-03-18 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-18 20:13:18] Production.INFO: count ==2005  
[2025-03-18 20:13:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:13:05 - End Time 2025-03-18 20:13:05  
[2025-03-18 20:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710527', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710527', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710527', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710527', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:13:18] Production.INFO: ProcessCDR(1,14710527,1,1,2)  
[2025-03-18 20:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:13:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710527,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:13:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:13:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710527,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:13:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710527', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:13:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710527', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:13:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:13:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:13:24] Production.INFO: ==3616== Releasing lock...  
[2025-03-18 20:13:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:13:24] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 20:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:14:06
    [end_date_ymd] => 2025-03-18 20:14:06
    [RateCDR] => 1
)
  
[2025-03-18 20:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:14:06' and `end` < '2025-03-18 20:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:14:18] Production.INFO: count ==1992  
[2025-03-18 20:14:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:14:06 - End Time 2025-03-18 20:14:06  
[2025-03-18 20:14:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710532', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710532', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710532', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:14:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710532', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:14:19] Production.INFO: ProcessCDR(1,14710532,1,1,2)  
[2025-03-18 20:14:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:14:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:14:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710532', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710532', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:14:22] Production.INFO: ==3691== Releasing lock...  
[2025-03-18 20:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:14:22] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 20:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:15:05
    [end_date_ymd] => 2025-03-18 20:15:05
    [RateCDR] => 1
)
  
[2025-03-18 20:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:15:05' and `end` < '2025-03-18 20:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:15:18] Production.INFO: count ==1989  
[2025-03-18 20:15:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:15:05 - End Time 2025-03-18 20:15:05  
[2025-03-18 20:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710537', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710537', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710537', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710537', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:15:18] Production.INFO: ProcessCDR(1,14710537,1,1,2)  
[2025-03-18 20:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:15:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710537', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:15:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710537', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:15:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:15:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:15:22] Production.INFO: ==3764== Releasing lock...  
[2025-03-18 20:15:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:15:22] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 20:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:16:06
    [end_date_ymd] => 2025-03-18 20:16:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:16:06' and `end` < '2025-03-18 20: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-18 20:16:18] Production.INFO: count ==1984  
[2025-03-18 20:16:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:16:06 - End Time 2025-03-18 20:16:06  
[2025-03-18 20:16:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710542', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710542', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710542', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:16:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710542', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:16:19] Production.INFO: ProcessCDR(1,14710542,1,1,2)  
[2025-03-18 20:16:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:16:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:16:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:16:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:16:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710542', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:16:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710542', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:16:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:16:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:16:24] Production.INFO: ==3841== Releasing lock...  
[2025-03-18 20:16:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:16:24] Production.INFO: 43 MB  #Memory Used#   
[2025-03-18 20:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:17:05
    [end_date_ymd] => 2025-03-18 20:17:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:17:05' and `end` < '2025-03-18 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-18 20:17:18] Production.INFO: count ==1979  
[2025-03-18 20:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:17:05 - End Time 2025-03-18 20:17:05  
[2025-03-18 20:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710547', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710547', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710547', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710547', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:17:18] Production.INFO: ProcessCDR(1,14710547,1,1,2)  
[2025-03-18 20:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:17:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710547', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:17:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710547', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:17:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:17:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:17:22] Production.INFO: ==3918== Releasing lock...  
[2025-03-18 20:17:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:17:22] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 20:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:18:06
    [end_date_ymd] => 2025-03-18 20:18:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:18:06' and `end` < '2025-03-18 20: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-18 20:18:18] Production.INFO: count ==1977  
[2025-03-18 20:18:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:18:06 - End Time 2025-03-18 20:18:06  
[2025-03-18 20:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710552', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710552', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710552', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710552', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:18:19] Production.INFO: ProcessCDR(1,14710552,1,1,2)  
[2025-03-18 20:18:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710552', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710552', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:18:22] Production.INFO: ==3992== Releasing lock...  
[2025-03-18 20:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:18:22] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 20:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:19:05
    [end_date_ymd] => 2025-03-18 20:19:05
    [RateCDR] => 1
)
  
[2025-03-18 20:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:19:05' and `end` < '2025-03-18 20:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:19:17] Production.INFO: count ==1979  
[2025-03-18 20:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:19:05 - End Time 2025-03-18 20:19:05  
[2025-03-18 20:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710557', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710557', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710557', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710557', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:19:18] Production.INFO: ProcessCDR(1,14710557,1,1,2)  
[2025-03-18 20:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:19:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:19:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:19:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:19:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710557', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:19:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710557', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:19:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:19:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:19:23] Production.INFO: ==4063== Releasing lock...  
[2025-03-18 20:19:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:19:23] Production.INFO: 42.75 MB  #Memory Used#   
[2025-03-18 20:20:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:20:07
    [end_date_ymd] => 2025-03-18 20:20:07
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:20:07' and `end` < '2025-03-18 20: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-18 20:20:19] Production.INFO: count ==1979  
[2025-03-18 20:20:20] Production.ERROR: pbx CDR StartTime 2025-03-18 17:20:07 - End Time 2025-03-18 20:20:07  
[2025-03-18 20:20:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710563', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710563', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710563', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:20:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710563', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:20:20] Production.INFO: ProcessCDR(1,14710563,1,1,2)  
[2025-03-18 20:20:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710563,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:20:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710563,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710563', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710563', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:20:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:20:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:20:24] Production.INFO: ==4147== Releasing lock...  
[2025-03-18 20:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:20:24] Production.INFO: 43 MB  #Memory Used#   
[2025-03-18 20:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:21:06
    [end_date_ymd] => 2025-03-18 20:21:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:21:06' and `end` < '2025-03-18 20: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-18 20:21:18] Production.INFO: count ==1936  
[2025-03-18 20:21:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:21:06 - End Time 2025-03-18 20:21:06  
[2025-03-18 20:21:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710568', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710568', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710568', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:21:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710568', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:21:19] Production.INFO: ProcessCDR(1,14710568,1,1,2)  
[2025-03-18 20:21:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:21:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710568,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:21:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:21:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710568,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710568', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:21:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710568', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:21:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:21:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:21:24] Production.INFO: ==4261== Releasing lock...  
[2025-03-18 20:21:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:21:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:22:06
    [end_date_ymd] => 2025-03-18 20:22:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:22:06' and `end` < '2025-03-18 20: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-18 20:22:18] Production.INFO: count ==1933  
[2025-03-18 20:22:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:22:06 - End Time 2025-03-18 20:22:06  
[2025-03-18 20:22:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710573', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710573', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710573', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710573', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:22:19] Production.INFO: ProcessCDR(1,14710573,1,1,2)  
[2025-03-18 20:22:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710573,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710573,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710573', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710573', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:22:22] Production.INFO: ==4331== Releasing lock...  
[2025-03-18 20:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:22:22] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 20:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:23:05
    [end_date_ymd] => 2025-03-18 20:23:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:23:05' and `end` < '2025-03-18 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-18 20:23:17] Production.INFO: count ==1923  
[2025-03-18 20:23:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:23:05 - End Time 2025-03-18 20:23:05  
[2025-03-18 20:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710578', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710578', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710578', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710578', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:23:18] Production.INFO: ProcessCDR(1,14710578,1,1,2)  
[2025-03-18 20:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:23:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710578,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:23:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:23:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710578,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710578', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:23:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710578', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:23:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:23:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:23:23] Production.INFO: ==4403== Releasing lock...  
[2025-03-18 20:23:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:23:23] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 20:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:24:06
    [end_date_ymd] => 2025-03-18 20:24:06
    [RateCDR] => 1
)
  
[2025-03-18 20:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:24:06' and `end` < '2025-03-18 20:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:24:18] Production.INFO: count ==1918  
[2025-03-18 20:24:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:24:06 - End Time 2025-03-18 20:24:06  
[2025-03-18 20:24:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710583', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710583', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710583', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:24:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710583', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:24:19] Production.INFO: ProcessCDR(1,14710583,1,1,2)  
[2025-03-18 20:24:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:24:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:24:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710583', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710583', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:24:22] Production.INFO: ==4476== Releasing lock...  
[2025-03-18 20:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:24:22] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:25:05
    [end_date_ymd] => 2025-03-18 20:25:05
    [RateCDR] => 1
)
  
[2025-03-18 20:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:25:05' and `end` < '2025-03-18 20:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:25:17] Production.INFO: count ==1917  
[2025-03-18 20:25:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:25:05 - End Time 2025-03-18 20:25:05  
[2025-03-18 20:25:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710588', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710588', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710588', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:25:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710588', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:25:18] Production.INFO: ProcessCDR(1,14710588,1,1,2)  
[2025-03-18 20:25:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:25:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:25:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:25:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710588', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:25:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710588', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:25:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:25:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:25:23] Production.INFO: ==4548== Releasing lock...  
[2025-03-18 20:25:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:25:23] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 20:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:26:06
    [end_date_ymd] => 2025-03-18 20:26:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:26:06' and `end` < '2025-03-18 20: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-18 20:26:18] Production.INFO: count ==1918  
[2025-03-18 20:26:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:26:06 - End Time 2025-03-18 20:26:06  
[2025-03-18 20:26:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710593', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710593', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710593', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710593', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:26:19] Production.INFO: ProcessCDR(1,14710593,1,1,2)  
[2025-03-18 20:26:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:26:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:26:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:26:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710593', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:26:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710593', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:26:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:26:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:26:24] Production.INFO: ==4633== Releasing lock...  
[2025-03-18 20:26:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:26:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:27:05
    [end_date_ymd] => 2025-03-18 20:27:05
    [RateCDR] => 1
)
  
[2025-03-18 20:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:27:05' and `end` < '2025-03-18 20:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:27:18] Production.INFO: count ==1914  
[2025-03-18 20:27:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:27:05 - End Time 2025-03-18 20:27:05  
[2025-03-18 20:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710598', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710598', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710598', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710598', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:27:18] Production.INFO: ProcessCDR(1,14710598,1,1,2)  
[2025-03-18 20:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:27:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:27:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:27:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:27:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710598', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:27:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710598', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:27:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:27:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:27:23] Production.INFO: ==4706== Releasing lock...  
[2025-03-18 20:27:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:27:23] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 20:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:28:06
    [end_date_ymd] => 2025-03-18 20:28:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:28:06' and `end` < '2025-03-18 20: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-18 20:28:18] Production.INFO: count ==1910  
[2025-03-18 20:28:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:28:06 - End Time 2025-03-18 20:28:06  
[2025-03-18 20:28:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710603', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710603', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710603', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:28:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710603', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:28:19] Production.INFO: ProcessCDR(1,14710603,1,1,2)  
[2025-03-18 20:28:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:28:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:28:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:28:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710603', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710603', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:28:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:28:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:28:23] Production.INFO: ==4778== Releasing lock...  
[2025-03-18 20:28:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:28:23] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:29:06
    [end_date_ymd] => 2025-03-18 20:29:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:29:06' and `end` < '2025-03-18 20: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-18 20:29:19] Production.INFO: count ==1908  
[2025-03-18 20:29:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:29:06 - End Time 2025-03-18 20:29:06  
[2025-03-18 20:29:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710608', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710608', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710608', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:29:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710608', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:29:19] Production.INFO: ProcessCDR(1,14710608,1,1,2)  
[2025-03-18 20:29:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:29:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:29:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:29:25] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710608', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:29:25] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710608', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:29:25] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:29:25] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:29:25] Production.INFO: ==4850== Releasing lock...  
[2025-03-18 20:29:25] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:29:25] Production.INFO: 42 MB  #Memory Used#   
[2025-03-18 20:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:30:06
    [end_date_ymd] => 2025-03-18 20:30:06
    [RateCDR] => 1
)
  
[2025-03-18 20:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:30:06' and `end` < '2025-03-18 20:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:30:18] Production.INFO: count ==1906  
[2025-03-18 20:30:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:30:06 - End Time 2025-03-18 20:30:06  
[2025-03-18 20:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710611', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710611', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:30:19] Production.INFO: ProcessCDR(1,14710611,1,1,2)  
[2025-03-18 20:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:30:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710611,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:30:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:30:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710611,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710611', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:30:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710611', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:30:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:30:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:30:24] Production.INFO: ==4930== Releasing lock...  
[2025-03-18 20:30:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:30:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:31:05
    [end_date_ymd] => 2025-03-18 20:31:05
    [RateCDR] => 1
)
  
[2025-03-18 20:31:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:31:05' and `end` < '2025-03-18 20:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:31:18] Production.INFO: count ==1845  
[2025-03-18 20:31:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:31:05 - End Time 2025-03-18 20:31:05  
[2025-03-18 20:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710619', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710619', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710619', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710619', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:31:18] Production.INFO: ProcessCDR(1,14710619,1,1,2)  
[2025-03-18 20:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710619,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:31:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710619,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710619', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710619', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:31:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:31:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:31:22] Production.INFO: ==5004== Releasing lock...  
[2025-03-18 20:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:31:22] Production.INFO: 42.5 MB  #Memory Used#   
[2025-03-18 20:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:32:06
    [end_date_ymd] => 2025-03-18 20:32:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:32:06' and `end` < '2025-03-18 20: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-18 20:32:18] Production.INFO: count ==1846  
[2025-03-18 20:32:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:32:06 - End Time 2025-03-18 20:32:06  
[2025-03-18 20:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710624', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710624', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710624', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710624', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:32:19] Production.INFO: ProcessCDR(1,14710624,1,1,2)  
[2025-03-18 20:32:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:32:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710624,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:32:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:32:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710624,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710624', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710624', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:32:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:32:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:32:24] Production.INFO: ==5075== Releasing lock...  
[2025-03-18 20:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:32:24] Production.INFO: 42 MB  #Memory Used#   
[2025-03-18 20:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:33:05
    [end_date_ymd] => 2025-03-18 20:33:05
    [RateCDR] => 1
)
  
[2025-03-18 20:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:33:05' and `end` < '2025-03-18 20:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:33:18] Production.INFO: count ==1829  
[2025-03-18 20:33:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:33:05 - End Time 2025-03-18 20:33:05  
[2025-03-18 20:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710629', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710629', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710629', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710629', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:33:18] Production.INFO: ProcessCDR(1,14710629,1,1,2)  
[2025-03-18 20:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710629,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:33:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710629,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710629', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710629', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:33:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:33:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:33:22] Production.INFO: ==5152== Releasing lock...  
[2025-03-18 20:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:33:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-03-18 20:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:34:05
    [end_date_ymd] => 2025-03-18 20:34:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:34:05' and `end` < '2025-03-18 20: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-18 20:34:18] Production.INFO: count ==1832  
[2025-03-18 20:34:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:34:05 - End Time 2025-03-18 20:34:05  
[2025-03-18 20:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710634', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710634', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710634', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710634', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:34:18] Production.INFO: ProcessCDR(1,14710634,1,1,2)  
[2025-03-18 20:34:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:34:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:34:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:34:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710634', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710634', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:34:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:34:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:34:22] Production.INFO: ==5228== Releasing lock...  
[2025-03-18 20:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:34:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-03-18 20:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:35:05
    [end_date_ymd] => 2025-03-18 20:35:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:35:05' and `end` < '2025-03-18 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-18 20:35:17] Production.INFO: count ==1833  
[2025-03-18 20:35:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:35:05 - End Time 2025-03-18 20:35:05  
[2025-03-18 20:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710639', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710639', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710639', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710639', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:35:18] Production.INFO: ProcessCDR(1,14710639,1,1,2)  
[2025-03-18 20:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:35:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710639', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710639', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:35:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:35:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:35:22] Production.INFO: ==5297== Releasing lock...  
[2025-03-18 20:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:35:22] Production.INFO: 41.5 MB  #Memory Used#   
[2025-03-18 20:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:36:06
    [end_date_ymd] => 2025-03-18 20:36:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:36:06' and `end` < '2025-03-18 20: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-18 20:36:18] Production.INFO: count ==1839  
[2025-03-18 20:36:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:36:06 - End Time 2025-03-18 20:36:06  
[2025-03-18 20:36:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710644', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710644', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710644', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710644', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:36:19] Production.INFO: ProcessCDR(1,14710644,1,1,2)  
[2025-03-18 20:36:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:36:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:36:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710644', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710644', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:36:23] Production.INFO: ==5410== Releasing lock...  
[2025-03-18 20:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:36:23] Production.INFO: 41.75 MB  #Memory Used#   
[2025-03-18 20:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:37:05
    [end_date_ymd] => 2025-03-18 20:37:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:37:05' and `end` < '2025-03-18 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-18 20:37:18] Production.INFO: count ==1903  
[2025-03-18 20:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:37:05 - End Time 2025-03-18 20:37:05  
[2025-03-18 20:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710649', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710649', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710649', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710649', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:37:18] Production.INFO: ProcessCDR(1,14710649,1,1,2)  
[2025-03-18 20:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710649', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710649', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:37:22] Production.INFO: ==5481== Releasing lock...  
[2025-03-18 20:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:37:22] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:38:06
    [end_date_ymd] => 2025-03-18 20:38:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:38:06' and `end` < '2025-03-18 20: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-18 20:38:18] Production.INFO: count ==1903  
[2025-03-18 20:38:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:38:06 - End Time 2025-03-18 20:38:06  
[2025-03-18 20:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710654', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710654', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710654', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710654', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:38:19] Production.INFO: ProcessCDR(1,14710654,1,1,2)  
[2025-03-18 20:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:38:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:38:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:38:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710654', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:38:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710654', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:38:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:38:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:38:24] Production.INFO: ==5553== Releasing lock...  
[2025-03-18 20:38:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:38:24] Production.INFO: 42 MB  #Memory Used#   
[2025-03-18 20:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:39:05
    [end_date_ymd] => 2025-03-18 20:39:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:39:05' and `end` < '2025-03-18 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-18 20:39:18] Production.INFO: count ==1900  
[2025-03-18 20:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:39:05 - End Time 2025-03-18 20:39:05  
[2025-03-18 20:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710659', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710659', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710659', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710659', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:39:18] Production.INFO: ProcessCDR(1,14710659,1,1,2)  
[2025-03-18 20:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710659', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710659', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:39:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:39:22] Production.INFO: ==5629== Releasing lock...  
[2025-03-18 20:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:39:22] Production.INFO: 42 MB  #Memory Used#   
[2025-03-18 20:40:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:40:07
    [end_date_ymd] => 2025-03-18 20:40:07
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:40:07' and `end` < '2025-03-18 20: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-18 20:40:19] Production.INFO: count ==1895  
[2025-03-18 20:40:20] Production.ERROR: pbx CDR StartTime 2025-03-18 17:40:07 - End Time 2025-03-18 20:40:07  
[2025-03-18 20:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710665', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710665', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710665', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710665', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:40:20] Production.INFO: ProcessCDR(1,14710665,1,1,2)  
[2025-03-18 20:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710665,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:40:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710665,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710665', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:40:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710665', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:40:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:40:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:40:24] Production.INFO: ==5709== Releasing lock...  
[2025-03-18 20:40:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:40:24] Production.INFO: 42.25 MB  #Memory Used#   
[2025-03-18 20:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:41:05
    [end_date_ymd] => 2025-03-18 20:41:05
    [RateCDR] => 1
)
  
[2025-03-18 20:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:41:05' and `end` < '2025-03-18 20:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:41:17] Production.INFO: count ==1824  
[2025-03-18 20:41:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:41:05 - End Time 2025-03-18 20:41:05  
[2025-03-18 20:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710670', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710670', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710670', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710670', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:41:18] Production.INFO: ProcessCDR(1,14710670,1,1,2)  
[2025-03-18 20:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710670,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710670,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710670', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710670', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:41:21] Production.INFO: ==5782== Releasing lock...  
[2025-03-18 20:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:41:21] Production.INFO: 41.75 MB  #Memory Used#   
[2025-03-18 20:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:42:05
    [end_date_ymd] => 2025-03-18 20:42:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:42:05' and `end` < '2025-03-18 20: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-18 20:42:18] Production.INFO: count ==1816  
[2025-03-18 20:42:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:42:05 - End Time 2025-03-18 20:42:05  
[2025-03-18 20:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710675', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710675', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710675', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710675', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:42:18] Production.INFO: ProcessCDR(1,14710675,1,1,2)  
[2025-03-18 20:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:42:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710675,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:42:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710675,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710675', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710675', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:42:22] Production.INFO: ==5855== Releasing lock...  
[2025-03-18 20:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:42:22] Production.INFO: 41.75 MB  #Memory Used#   
[2025-03-18 20:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:43:04
    [end_date_ymd] => 2025-03-18 20:43:04
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:43:04' and `end` < '2025-03-18 20: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-18 20:43:17] Production.INFO: count ==1809  
[2025-03-18 20:43:17] Production.ERROR: pbx CDR StartTime 2025-03-18 17:43:04 - End Time 2025-03-18 20:43:04  
[2025-03-18 20:43:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:43:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710680', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710680', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710680', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710680', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:43:18] Production.INFO: ProcessCDR(1,14710680,1,1,2)  
[2025-03-18 20:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710680,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710680,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710680', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710680', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:43:21] Production.INFO: ==5930== Releasing lock...  
[2025-03-18 20:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:43:21] Production.INFO: 41.5 MB  #Memory Used#   
[2025-03-18 20:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:44:05
    [end_date_ymd] => 2025-03-18 20:44:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:44:05' and `end` < '2025-03-18 20: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-18 20:44:17] Production.INFO: count ==1812  
[2025-03-18 20:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:44:05 - End Time 2025-03-18 20:44:05  
[2025-03-18 20:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710685', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710685', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710685', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710685', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:44:18] Production.INFO: ProcessCDR(1,14710685,1,1,2)  
[2025-03-18 20:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:44:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710685,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:44:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:44:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710685,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710685', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710685', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:44:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:44:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:44:23] Production.INFO: ==6004== Releasing lock...  
[2025-03-18 20:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:44:23] Production.INFO: 41.75 MB  #Memory Used#   
[2025-03-18 20:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:45:06
    [end_date_ymd] => 2025-03-18 20:45:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:45:06' and `end` < '2025-03-18 20: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-18 20:45:18] Production.INFO: count ==1805  
[2025-03-18 20:45:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:45:06 - End Time 2025-03-18 20:45:06  
[2025-03-18 20:45:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710690', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710690', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710690', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:45:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710690', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:45:19] Production.INFO: ProcessCDR(1,14710690,1,1,2)  
[2025-03-18 20:45:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:45:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710690,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:45:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:45:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710690,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710690', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:45:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710690', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:45:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:45:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:45:24] Production.INFO: ==6080== Releasing lock...  
[2025-03-18 20:45:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:45:24] Production.INFO: 41.5 MB  #Memory Used#   
[2025-03-18 20:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:46:05
    [end_date_ymd] => 2025-03-18 20:46:05
    [RateCDR] => 1
)
  
[2025-03-18 20:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:46:05' and `end` < '2025-03-18 20:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:46:18] Production.INFO: count ==1804  
[2025-03-18 20:46:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:46:05 - End Time 2025-03-18 20:46:05  
[2025-03-18 20:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710695', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710695', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710695', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710695', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:46:18] Production.INFO: ProcessCDR(1,14710695,1,1,2)  
[2025-03-18 20:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710695,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:46:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710695,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710695', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710695', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:46:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:46:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:46:22] Production.INFO: ==6155== Releasing lock...  
[2025-03-18 20:46:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:46:22] Production.INFO: 41.5 MB  #Memory Used#   
[2025-03-18 20:47:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:47:06
    [end_date_ymd] => 2025-03-18 20:47:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:47:06' and `end` < '2025-03-18 20: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-18 20:47:18] Production.INFO: count ==1802  
[2025-03-18 20:47:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:47:06 - End Time 2025-03-18 20:47:06  
[2025-03-18 20:47:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710700', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710700', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710700', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:47:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710700', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:47:19] Production.INFO: ProcessCDR(1,14710700,1,1,2)  
[2025-03-18 20:47:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:47:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710700,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:47:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:47:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710700,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:47:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710700', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:47:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710700', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:47:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:47:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:47:22] Production.INFO: ==6233== Releasing lock...  
[2025-03-18 20:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:47:22] Production.INFO: 41.5 MB  #Memory Used#   
[2025-03-18 20:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:48:06
    [end_date_ymd] => 2025-03-18 20:48:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:48:06' and `end` < '2025-03-18 20: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-18 20:48:18] Production.INFO: count ==1799  
[2025-03-18 20:48:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:48:06 - End Time 2025-03-18 20:48:06  
[2025-03-18 20:48:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710705', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710705', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710705', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710705', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:48:19] Production.INFO: ProcessCDR(1,14710705,1,1,2)  
[2025-03-18 20:48:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:48:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710705,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:48:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:48:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710705,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710705', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:48:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710705', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:48:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:48:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:48:22] Production.INFO: ==6307== Releasing lock...  
[2025-03-18 20:48:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:48:22] Production.INFO: 41.5 MB  #Memory Used#   
[2025-03-18 20:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:49:06
    [end_date_ymd] => 2025-03-18 20:49:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:49:06' and `end` < '2025-03-18 20: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-18 20:49:18] Production.INFO: count ==1795  
[2025-03-18 20:49:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:49:06 - End Time 2025-03-18 20:49:06  
[2025-03-18 20:49:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710710', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710710', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710710', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:49:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710710', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:49:19] Production.INFO: ProcessCDR(1,14710710,1,1,2)  
[2025-03-18 20:49:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:49:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710710,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:49:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:49:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710710,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710710', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710710', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:49:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:49:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:49:22] Production.INFO: ==6383== Releasing lock...  
[2025-03-18 20:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:49:22] Production.INFO: 41.25 MB  #Memory Used#   
[2025-03-18 20:50:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:50:05
    [end_date_ymd] => 2025-03-18 20:50:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 17:50:05' and `end` < '2025-03-18 20: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-18 20:50:18] Production.INFO: count ==1795  
[2025-03-18 20:50:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:50:05 - End Time 2025-03-18 20:50:05  
[2025-03-18 20:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710715', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710715', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710715', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710715', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:50:19] Production.INFO: ProcessCDR(1,14710715,1,1,2)  
[2025-03-18 20:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:50:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710715,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:50:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:50:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710715,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710715', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:50:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710715', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:50:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:50:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:50:24] Production.INFO: ==6470== Releasing lock...  
[2025-03-18 20:50:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:50:24] Production.INFO: 41.25 MB  #Memory Used#   
[2025-03-18 20:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:51:05
    [end_date_ymd] => 2025-03-18 20:51:05
    [RateCDR] => 1
)
  
[2025-03-18 20:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:51:05' and `end` < '2025-03-18 20:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:51:17] Production.INFO: count ==1740  
[2025-03-18 20:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:51:05 - End Time 2025-03-18 20:51:05  
[2025-03-18 20:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710721', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710721', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710721', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710721', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:51:18] Production.INFO: ProcessCDR(1,14710721,1,1,2)  
[2025-03-18 20:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710721,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:51:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710721,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710721', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:51:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710721', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:51:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:51:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:51:21] Production.INFO: ==6556== Releasing lock...  
[2025-03-18 20:51:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:51:21] Production.INFO: 41 MB  #Memory Used#   
[2025-03-18 20:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:52:05
    [end_date_ymd] => 2025-03-18 20:52:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:52:05' and `end` < '2025-03-18 20: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-18 20:52:18] Production.INFO: count ==1729  
[2025-03-18 20:52:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:52:05 - End Time 2025-03-18 20:52:05  
[2025-03-18 20:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710726', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710726', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710726', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710726', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:52:18] Production.INFO: ProcessCDR(1,14710726,1,1,2)  
[2025-03-18 20:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710726,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710726,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710726', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710726', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:52:22] Production.INFO: ==6676== Releasing lock...  
[2025-03-18 20:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:52:22] Production.INFO: 41.25 MB  #Memory Used#   
[2025-03-18 20:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:53:06
    [end_date_ymd] => 2025-03-18 20:53:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:53:06' and `end` < '2025-03-18 20: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-18 20:53:18] Production.INFO: count ==1727  
[2025-03-18 20:53:19] Production.ERROR: pbx CDR StartTime 2025-03-18 17:53:06 - End Time 2025-03-18 20:53:06  
[2025-03-18 20:53:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710731', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710731', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710731', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:53:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710731', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:53:19] Production.INFO: ProcessCDR(1,14710731,1,1,2)  
[2025-03-18 20:53:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:53:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710731,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:53:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710731,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710731', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710731', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:53:22] Production.INFO: ==6764== Releasing lock...  
[2025-03-18 20:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:53:22] Production.INFO: 41 MB  #Memory Used#   
[2025-03-18 20:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:54:06
    [end_date_ymd] => 2025-03-18 20:54:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:54:06' and `end` < '2025-03-18 20: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-18 20:54:18] Production.INFO: count ==1723  
[2025-03-18 20:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:54:06 - End Time 2025-03-18 20:54:06  
[2025-03-18 20:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710736', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710736', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710736', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710736', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:54:18] Production.INFO: ProcessCDR(1,14710736,1,1,2)  
[2025-03-18 20:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710736,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710736,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710736', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710736', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:54:22] Production.INFO: ==6849== Releasing lock...  
[2025-03-18 20:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:54:22] Production.INFO: 41 MB  #Memory Used#   
[2025-03-18 20:55:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:55:06
    [end_date_ymd] => 2025-03-18 20:55:06
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:55:06' and `end` < '2025-03-18 20: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-18 20:55:18] Production.INFO: count ==1718  
[2025-03-18 20:55:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:55:06 - End Time 2025-03-18 20:55:06  
[2025-03-18 20:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710741', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710741', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710741', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710741', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:55:18] Production.INFO: ProcessCDR(1,14710741,1,1,2)  
[2025-03-18 20:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710741,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710741,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710741', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710741', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:55:22] Production.INFO: ==6936== Releasing lock...  
[2025-03-18 20:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:55:22] Production.INFO: 41 MB  #Memory Used#   
[2025-03-18 20:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:56:05
    [end_date_ymd] => 2025-03-18 20:56:05
    [RateCDR] => 1
)
  
[2025-03-18 20:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:56:05' and `end` < '2025-03-18 20:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:56:18] Production.INFO: count ==1717  
[2025-03-18 20:56:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:56:05 - End Time 2025-03-18 20:56:05  
[2025-03-18 20:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710746', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710746', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710746', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710746', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:56:18] Production.INFO: ProcessCDR(1,14710746,1,1,2)  
[2025-03-18 20:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:56:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710746,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:56:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:56:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710746,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710746', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:56:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710746', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:56:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:56:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:56:23] Production.INFO: ==7025== Releasing lock...  
[2025-03-18 20:56:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:56:23] Production.INFO: 41 MB  #Memory Used#   
[2025-03-18 20:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:57:05
    [end_date_ymd] => 2025-03-18 20:57:05
    [RateCDR] => 1
)
  
[2025-03-18 20:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:57:05' and `end` < '2025-03-18 20:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:57:18] Production.INFO: count ==1701  
[2025-03-18 20:57:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:57:05 - End Time 2025-03-18 20:57:05  
[2025-03-18 20:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710751', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710751', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710751', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710751', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:57:18] Production.INFO: ProcessCDR(1,14710751,1,1,2)  
[2025-03-18 20:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710751,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:57:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710751,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710751', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:57:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710751', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:57:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:57:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:57:22] Production.INFO: ==7110== Releasing lock...  
[2025-03-18 20:57:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:57:22] Production.INFO: 40.75 MB  #Memory Used#   
[2025-03-18 20:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:58:05
    [end_date_ymd] => 2025-03-18 20:58:05
    [RateCDR] => 1
)
  
[2025-03-18 20: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-18 17:58:05' and `end` < '2025-03-18 20:58:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:58:17] Production.INFO: count ==1689  
[2025-03-18 20:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:58:05 - End Time 2025-03-18 20:58:05  
[2025-03-18 20:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710756', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710756', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710756', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710756', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:58:18] Production.INFO: ProcessCDR(1,14710756,1,1,2)  
[2025-03-18 20:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710756,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:58:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710756,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710756', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:58:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710756', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:58:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:58:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:58:21] Production.INFO: ==7195== Releasing lock...  
[2025-03-18 20:58:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:58:21] Production.INFO: 41.25 MB  #Memory Used#   
[2025-03-18 20:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 17:59:05
    [end_date_ymd] => 2025-03-18 20:59:05
    [RateCDR] => 1
)
  
[2025-03-18 20:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 17:59:05' and `end` < '2025-03-18 20:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 20:59:18] Production.INFO: count ==1687  
[2025-03-18 20:59:18] Production.ERROR: pbx CDR StartTime 2025-03-18 17:59:05 - End Time 2025-03-18 20:59:05  
[2025-03-18 20:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 20:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710761', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710761', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710761', 'tblTempVendorCDR_20' ) start  
[2025-03-18 20:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710761', 'tblTempVendorCDR_20' ) end  
[2025-03-18 20:59:18] Production.INFO: ProcessCDR(1,14710761,1,1,2)  
[2025-03-18 20:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:59:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710761,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 20:59:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:59:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710761,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 20:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710761', 'tblTempUsageDetail_20' ) start  
[2025-03-18 20:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710761', 'tblTempUsageDetail_20' ) end  
[2025-03-18 20:59:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 20:59:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 20:59:22] Production.INFO: ==7287== Releasing lock...  
[2025-03-18 20:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 20:59:22] Production.INFO: 40.75 MB  #Memory Used#   
[2025-03-18 21:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:00:06
    [end_date_ymd] => 2025-03-18 21:00:06
    [RateCDR] => 1
)
  
[2025-03-18 21:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:00:06' and `end` < '2025-03-18 21:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:00:18] Production.INFO: count ==1659  
[2025-03-18 21:00:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:00:06 - End Time 2025-03-18 21:00:06  
[2025-03-18 21:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710766', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710766', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710766', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710766', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:00:19] Production.INFO: ProcessCDR(1,14710766,1,1,2)  
[2025-03-18 21:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710766,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:00:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710766,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710766', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:00:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710766', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:00:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:00:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:00:22] Production.INFO: ==7378== Releasing lock...  
[2025-03-18 21:00:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:00:22] Production.INFO: 40.5 MB  #Memory Used#   
[2025-03-18 21:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:01:06
    [end_date_ymd] => 2025-03-18 21:01:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:01:06' and `end` < '2025-03-18 21: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-18 21:01:18] Production.INFO: count ==1636  
[2025-03-18 21:01:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:01:06 - End Time 2025-03-18 21:01:06  
[2025-03-18 21:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710772', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710772', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710772', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710772', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:01:18] Production.INFO: ProcessCDR(1,14710772,1,1,2)  
[2025-03-18 21:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710772,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710772,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710772', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710772', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:01:22] Production.INFO: ==7475== Releasing lock...  
[2025-03-18 21:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:01:22] Production.INFO: 40.5 MB  #Memory Used#   
[2025-03-18 21:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:02:05
    [end_date_ymd] => 2025-03-18 21:02:05
    [RateCDR] => 1
)
  
[2025-03-18 21:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:02:05' and `end` < '2025-03-18 21:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:02:18] Production.INFO: count ==1642  
[2025-03-18 21:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:02:05 - End Time 2025-03-18 21:02:05  
[2025-03-18 21:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710777', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710777', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710777', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710777', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:02:18] Production.INFO: ProcessCDR(1,14710777,1,1,2)  
[2025-03-18 21:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:02:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710777,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:02:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:02:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710777,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710777', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:02:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710777', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:02:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:02:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:02:23] Production.INFO: ==7559== Releasing lock...  
[2025-03-18 21:02:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:02:23] Production.INFO: 40.5 MB  #Memory Used#   
[2025-03-18 21:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:03:05
    [end_date_ymd] => 2025-03-18 21:03:05
    [RateCDR] => 1
)
  
[2025-03-18 21:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:03:05' and `end` < '2025-03-18 21:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:03:18] Production.INFO: count ==1644  
[2025-03-18 21:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:03:05 - End Time 2025-03-18 21:03:05  
[2025-03-18 21:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710782', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710782', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710782', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710782', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:03:18] Production.INFO: ProcessCDR(1,14710782,1,1,2)  
[2025-03-18 21:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710782,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710782,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710782', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710782', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:03:22] Production.INFO: ==7646== Releasing lock...  
[2025-03-18 21:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:03:22] Production.INFO: 40.5 MB  #Memory Used#   
[2025-03-18 21:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:04:05
    [end_date_ymd] => 2025-03-18 21:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:04:05' and `end` < '2025-03-18 21:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:04:18] Production.INFO: count ==1630  
[2025-03-18 21:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:04:05 - End Time 2025-03-18 21:04:05  
[2025-03-18 21:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710787', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710787', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710787', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710787', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:04:18] Production.INFO: ProcessCDR(1,14710787,1,1,2)  
[2025-03-18 21:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710787,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:04:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710787,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710787', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:04:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710787', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:04:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:04:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:04:22] Production.INFO: ==7733== Releasing lock...  
[2025-03-18 21:04:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:04:22] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 21:05:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:05:05
    [end_date_ymd] => 2025-03-18 21:05:05
    [RateCDR] => 1
)
  
[2025-03-18 21:05:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:05:05' and `end` < '2025-03-18 21:05:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:05:18] Production.INFO: count ==1613  
[2025-03-18 21:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:05:05 - End Time 2025-03-18 21:05:05  
[2025-03-18 21:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710792', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710792', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710792', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710792', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:05:18] Production.INFO: ProcessCDR(1,14710792,1,1,2)  
[2025-03-18 21:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710792,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710792,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710792', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710792', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:05:21] Production.INFO: ==7818== Releasing lock...  
[2025-03-18 21:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:05:21] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 21:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:06:05
    [end_date_ymd] => 2025-03-18 21:06:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:06:05' and `end` < '2025-03-18 21:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:06:17] Production.INFO: count ==1612  
[2025-03-18 21:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:06:05 - End Time 2025-03-18 21:06:05  
[2025-03-18 21:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710797', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710797', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710797', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710797', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:06:18] Production.INFO: ProcessCDR(1,14710797,1,1,2)  
[2025-03-18 21:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:06:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710797,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:06:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:06:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710797,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:06:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710797', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:06:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710797', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:06:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:06:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:06:23] Production.INFO: ==7908== Releasing lock...  
[2025-03-18 21:06:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:06:23] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 21:07:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:07:05
    [end_date_ymd] => 2025-03-18 21:07:05
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:07:05' and `end` < '2025-03-18 21: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-18 21:07:18] Production.INFO: count ==1612  
[2025-03-18 21:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:07:05 - End Time 2025-03-18 21:07:05  
[2025-03-18 21:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710802', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710802', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710802', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710802', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:07:18] Production.INFO: ProcessCDR(1,14710802,1,1,2)  
[2025-03-18 21:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:07:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710802,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:07:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710802,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710802', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710802', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:07:22] Production.INFO: ==8027== Releasing lock...  
[2025-03-18 21:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:07:22] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 21:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:08:05
    [end_date_ymd] => 2025-03-18 21:08:05
    [RateCDR] => 1
)
  
[2025-03-18 21:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:08:05' and `end` < '2025-03-18 21:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:08:17] Production.INFO: count ==1606  
[2025-03-18 21:08:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:08:05 - End Time 2025-03-18 21:08:05  
[2025-03-18 21:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710807', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710807', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710807', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710807', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:08:18] Production.INFO: ProcessCDR(1,14710807,1,1,2)  
[2025-03-18 21:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:08:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710807,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:08:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:08:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710807,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710807', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710807', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:08:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:08:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:08:23] Production.INFO: ==8114== Releasing lock...  
[2025-03-18 21:08:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:08:23] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 21:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:09:05
    [end_date_ymd] => 2025-03-18 21:09:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:09:05' and `end` < '2025-03-18 21: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-18 21:09:18] Production.INFO: count ==1606  
[2025-03-18 21:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:09:05 - End Time 2025-03-18 21:09:05  
[2025-03-18 21:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710812', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710812', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710812', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710812', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:09:18] Production.INFO: ProcessCDR(1,14710812,1,1,2)  
[2025-03-18 21:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710812,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:09:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710812,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710812', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710812', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:09:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:09:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:09:22] Production.INFO: ==8203== Releasing lock...  
[2025-03-18 21:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:09:22] Production.INFO: 40.5 MB  #Memory Used#   
[2025-03-18 21:10:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:10:06
    [end_date_ymd] => 2025-03-18 21:10:06
    [RateCDR] => 1
)
  
[2025-03-18 21:10:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:10:06' and `end` < '2025-03-18 21:10:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:10:19] Production.INFO: count ==1607  
[2025-03-18 21:10:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:10:06 - End Time 2025-03-18 21:10:06  
[2025-03-18 21:10:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710818', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710818', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710818', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:10:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710818', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:10:19] Production.INFO: ProcessCDR(1,14710818,1,1,2)  
[2025-03-18 21:10:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:10:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710818,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:10:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:10:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710818,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:10:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710818', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:10:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710818', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:10:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:10:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:10:24] Production.INFO: ==8298== Releasing lock...  
[2025-03-18 21:10:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:10:24] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 21:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:11:05
    [end_date_ymd] => 2025-03-18 21:11:05
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:11:05' and `end` < '2025-03-18 21: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-18 21:11:18] Production.INFO: count ==1562  
[2025-03-18 21:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:11:05 - End Time 2025-03-18 21:11:05  
[2025-03-18 21:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710823', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710823', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710823', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710823', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:11:18] Production.INFO: ProcessCDR(1,14710823,1,1,2)  
[2025-03-18 21:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:11:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710823,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:11:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:11:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710823,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710823', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710823', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:11:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:11:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:11:23] Production.INFO: ==8385== Releasing lock...  
[2025-03-18 21:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:11:23] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:12:05
    [end_date_ymd] => 2025-03-18 21:12:05
    [RateCDR] => 1
)
  
[2025-03-18 21:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:12:05' and `end` < '2025-03-18 21:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:12:17] Production.INFO: count ==1560  
[2025-03-18 21:12:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:12:05 - End Time 2025-03-18 21:12:05  
[2025-03-18 21:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710828', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710828', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710828', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710828', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:12:18] Production.INFO: ProcessCDR(1,14710828,1,1,2)  
[2025-03-18 21:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:12:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710828,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:12:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:12:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710828,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710828', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:12:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710828', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:12:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:12:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:12:23] Production.INFO: ==8470== Releasing lock...  
[2025-03-18 21:12:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:12:23] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:13:05
    [end_date_ymd] => 2025-03-18 21:13:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:13:05' and `end` < '2025-03-18 21:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:13:17] Production.INFO: count ==1555  
[2025-03-18 21:13:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:13:05 - End Time 2025-03-18 21:13:05  
[2025-03-18 21:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710833', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710833', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710833', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710833', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:13:18] Production.INFO: ProcessCDR(1,14710833,1,1,2)  
[2025-03-18 21:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710833,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710833,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710833', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710833', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:13:21] Production.INFO: ==8553== Releasing lock...  
[2025-03-18 21:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:13:21] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:14:05
    [end_date_ymd] => 2025-03-18 21:14:05
    [RateCDR] => 1
)
  
[2025-03-18 21:14:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:14:05' and `end` < '2025-03-18 21:14:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:14:17] Production.INFO: count ==1552  
[2025-03-18 21:14:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:14:05 - End Time 2025-03-18 21:14:05  
[2025-03-18 21:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710838', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710838', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710838', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710838', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:14:18] Production.INFO: ProcessCDR(1,14710838,1,1,2)  
[2025-03-18 21:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:14:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710838,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:14:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710838,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710838', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:14:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710838', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:14:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:14:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:14:23] Production.INFO: ==8636== Releasing lock...  
[2025-03-18 21:14:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:14:23] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:15:05
    [end_date_ymd] => 2025-03-18 21:15:05
    [RateCDR] => 1
)
  
[2025-03-18 21:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:15:05' and `end` < '2025-03-18 21:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:15:18] Production.INFO: count ==1558  
[2025-03-18 21:15:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:15:05 - End Time 2025-03-18 21:15:05  
[2025-03-18 21:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710843', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710843', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710843', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710843', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:15:18] Production.INFO: ProcessCDR(1,14710843,1,1,2)  
[2025-03-18 21:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:15:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710843,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:15:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:15:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710843,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710843', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:15:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710843', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:15:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:15:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:15:23] Production.INFO: ==8725== Releasing lock...  
[2025-03-18 21:15:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:15:23] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 21:16:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:16:05
    [end_date_ymd] => 2025-03-18 21:16:05
    [RateCDR] => 1
)
  
[2025-03-18 21:16:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:16:05' and `end` < '2025-03-18 21:16:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:16:18] Production.INFO: count ==1562  
[2025-03-18 21:16:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:16:05 - End Time 2025-03-18 21:16:05  
[2025-03-18 21:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710848', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710848', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710848', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710848', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:16:18] Production.INFO: ProcessCDR(1,14710848,1,1,2)  
[2025-03-18 21:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710848,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:16:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710848,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710848', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710848', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:16:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:16:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:16:22] Production.INFO: ==8807== Releasing lock...  
[2025-03-18 21:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:16:22] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:17:05
    [end_date_ymd] => 2025-03-18 21:17:05
    [RateCDR] => 1
)
  
[2025-03-18 21:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:17:05' and `end` < '2025-03-18 21:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:17:17] Production.INFO: count ==1561  
[2025-03-18 21:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:17:05 - End Time 2025-03-18 21:17:05  
[2025-03-18 21:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710853', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710853', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710853', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710853', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:17:18] Production.INFO: ProcessCDR(1,14710853,1,1,2)  
[2025-03-18 21:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:17:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710853,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:17:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710853,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710853', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710853', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:17:21] Production.INFO: ==8889== Releasing lock...  
[2025-03-18 21:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:17:21] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:18:06
    [end_date_ymd] => 2025-03-18 21:18:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:18:06' and `end` < '2025-03-18 21: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-18 21:18:18] Production.INFO: count ==1559  
[2025-03-18 21:18:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:18:06 - End Time 2025-03-18 21:18:06  
[2025-03-18 21:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710858', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710858', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710858', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710858', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:18:19] Production.INFO: ProcessCDR(1,14710858,1,1,2)  
[2025-03-18 21:18:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710858,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710858,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710858', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710858', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:18:22] Production.INFO: ==8984== Releasing lock...  
[2025-03-18 21:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:18:22] Production.INFO: 40.25 MB  #Memory Used#   
[2025-03-18 21:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:19:05
    [end_date_ymd] => 2025-03-18 21:19:05
    [RateCDR] => 1
)
  
[2025-03-18 21:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:19:05' and `end` < '2025-03-18 21:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:19:17] Production.INFO: count ==1560  
[2025-03-18 21:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:19:05 - End Time 2025-03-18 21:19:05  
[2025-03-18 21:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710863', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710863', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710863', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710863', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:19:18] Production.INFO: ProcessCDR(1,14710863,1,1,2)  
[2025-03-18 21:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710863,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710863,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710863', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710863', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:19:21] Production.INFO: ==9070== Releasing lock...  
[2025-03-18 21:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:19:21] Production.INFO: 39.75 MB  #Memory Used#   
[2025-03-18 21:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:20:06
    [end_date_ymd] => 2025-03-18 21:20:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:20:06' and `end` < '2025-03-18 21: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-18 21:20:19] Production.INFO: count ==1559  
[2025-03-18 21:20:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:20:06 - End Time 2025-03-18 21:20:06  
[2025-03-18 21:20:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710869', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710869', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710869', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710869', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:20:19] Production.INFO: ProcessCDR(1,14710869,1,1,2)  
[2025-03-18 21:20:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710869,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710869,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710869', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710869', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:20:22] Production.INFO: ==9155== Releasing lock...  
[2025-03-18 21:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:20:22] Production.INFO: 40 MB  #Memory Used#   
[2025-03-18 21:21:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:21:06
    [end_date_ymd] => 2025-03-18 21:21:06
    [RateCDR] => 1
)
  
[2025-03-18 21:21:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:21:06' and `end` < '2025-03-18 21:21:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:21:18] Production.INFO: count ==1517  
[2025-03-18 21:21:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:21:06 - End Time 2025-03-18 21:21:06  
[2025-03-18 21:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710874', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710874', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710874', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710874', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:21:18] Production.INFO: ProcessCDR(1,14710874,1,1,2)  
[2025-03-18 21:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:21:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710874,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:21:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710874,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710874', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710874', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:21:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:21:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:21:22] Production.INFO: ==9236== Releasing lock...  
[2025-03-18 21:21:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:21:22] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:22:06
    [end_date_ymd] => 2025-03-18 21:22:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:22:06' and `end` < '2025-03-18 21: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-18 21:22:18] Production.INFO: count ==1521  
[2025-03-18 21:22:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:22:06 - End Time 2025-03-18 21:22:06  
[2025-03-18 21:22:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710879', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710879', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710879', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:22:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710879', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:22:19] Production.INFO: ProcessCDR(1,14710879,1,1,2)  
[2025-03-18 21:22:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:22:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710879,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:22:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710879,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710879', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710879', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:22:22] Production.INFO: ==9311== Releasing lock...  
[2025-03-18 21:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:22:22] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:23:05
    [end_date_ymd] => 2025-03-18 21:23:05
    [RateCDR] => 1
)
  
[2025-03-18 21:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:23:05' and `end` < '2025-03-18 21:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:23:18] Production.INFO: count ==1520  
[2025-03-18 21:23:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:23:05 - End Time 2025-03-18 21:23:05  
[2025-03-18 21:23:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710884', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710884', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710884', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710884', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:23:18] Production.INFO: ProcessCDR(1,14710884,1,1,2)  
[2025-03-18 21:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710884,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:23:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710884,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710884', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:23:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710884', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:23:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:23:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:23:22] Production.INFO: ==9432== Releasing lock...  
[2025-03-18 21:23:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:23:22] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:24:05
    [end_date_ymd] => 2025-03-18 21:24:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:24:05' and `end` < '2025-03-18 21:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:24:18] Production.INFO: count ==1515  
[2025-03-18 21:24:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:24:05 - End Time 2025-03-18 21:24:05  
[2025-03-18 21:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710889', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710889', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710889', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710889', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:24:18] Production.INFO: ProcessCDR(1,14710889,1,1,2)  
[2025-03-18 21:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710889,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710889,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710889', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710889', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:24:22] Production.INFO: ==9507== Releasing lock...  
[2025-03-18 21:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:24:22] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:25:05
    [end_date_ymd] => 2025-03-18 21:25:05
    [RateCDR] => 1
)
  
[2025-03-18 21:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:25:05' and `end` < '2025-03-18 21:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:25:17] Production.INFO: count ==1517  
[2025-03-18 21:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 18:25:05 - End Time 2025-03-18 21:25:05  
[2025-03-18 21:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710894', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710894', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710894', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710894', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:25:17] Production.INFO: ProcessCDR(1,14710894,1,1,2)  
[2025-03-18 21:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:25:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710894,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:25:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710894,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710894', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710894', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:25:21] Production.INFO: ==9583== Releasing lock...  
[2025-03-18 21:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:25:21] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:26:06
    [end_date_ymd] => 2025-03-18 21:26:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:26:06' and `end` < '2025-03-18 21: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-18 21:26:18] Production.INFO: count ==1495  
[2025-03-18 21:26:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:26:06 - End Time 2025-03-18 21:26:06  
[2025-03-18 21:26:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710899', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710899', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710899', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:26:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710899', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:26:19] Production.INFO: ProcessCDR(1,14710899,1,1,2)  
[2025-03-18 21:26:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:26:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710899,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:26:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:26:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710899,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710899', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710899', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:26:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:26:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:26:22] Production.INFO: ==9661== Releasing lock...  
[2025-03-18 21:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:26:22] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:27:05
    [end_date_ymd] => 2025-03-18 21:27:05
    [RateCDR] => 1
)
  
[2025-03-18 21:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:27:05' and `end` < '2025-03-18 21:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:27:17] Production.INFO: count ==1481  
[2025-03-18 21:27:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:27:05 - End Time 2025-03-18 21:27:05  
[2025-03-18 21:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710904', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710904', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710904', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710904', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:27:18] Production.INFO: ProcessCDR(1,14710904,1,1,2)  
[2025-03-18 21:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710904,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710904,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710904', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710904', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:27:21] Production.INFO: ==9733== Releasing lock...  
[2025-03-18 21:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:27:21] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:28:05
    [end_date_ymd] => 2025-03-18 21:28:05
    [RateCDR] => 1
)
  
[2025-03-18 21:28:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:28:05' and `end` < '2025-03-18 21:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:28:18] Production.INFO: count ==1478  
[2025-03-18 21:28:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:28:05 - End Time 2025-03-18 21:28:05  
[2025-03-18 21:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710909', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710909', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710909', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710909', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:28:18] Production.INFO: ProcessCDR(1,14710909,1,1,2)  
[2025-03-18 21:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710909,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:28:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710909,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710909', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710909', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:28:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:28:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:28:22] Production.INFO: ==9808== Releasing lock...  
[2025-03-18 21:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:28:22] Production.INFO: 39.5 MB  #Memory Used#   
[2025-03-18 21:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:29:05
    [end_date_ymd] => 2025-03-18 21:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:29:05' and `end` < '2025-03-18 21:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:29:17] Production.INFO: count ==1477  
[2025-03-18 21:29:17] Production.ERROR: pbx CDR StartTime 2025-03-18 18:29:05 - End Time 2025-03-18 21:29:05  
[2025-03-18 21:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710914', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710914', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710914', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710914', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:29:18] Production.INFO: ProcessCDR(1,14710914,1,1,2)  
[2025-03-18 21:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710914,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710914,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710914', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710914', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:29:21] Production.INFO: ==9883== Releasing lock...  
[2025-03-18 21:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:29:21] Production.INFO: 39.25 MB  #Memory Used#   
[2025-03-18 21:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:30:06
    [end_date_ymd] => 2025-03-18 21:30:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:30:06' and `end` < '2025-03-18 21: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-18 21:30:18] Production.INFO: count ==1469  
[2025-03-18 21:30:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:30:06 - End Time 2025-03-18 21:30:06  
[2025-03-18 21:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710919', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710919', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710919', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710919', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:30:19] Production.INFO: ProcessCDR(1,14710919,1,1,2)  
[2025-03-18 21:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710919,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710919,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710919', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710919', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:30:22] Production.INFO: ==9958== Releasing lock...  
[2025-03-18 21:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:30:22] Production.INFO: 39.25 MB  #Memory Used#   
[2025-03-18 21:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:31:05
    [end_date_ymd] => 2025-03-18 21:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:31:05' and `end` < '2025-03-18 21: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-18 21:31:18] Production.INFO: count ==1408  
[2025-03-18 21:31:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:31:05 - End Time 2025-03-18 21:31:05  
[2025-03-18 21:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710925', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710925', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710925', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710925', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:31:18] Production.INFO: ProcessCDR(1,14710925,1,1,2)  
[2025-03-18 21:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:31:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710925,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:31:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:31:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710925,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710925', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:31:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710925', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:31:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:31:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:31:21] Production.INFO: ==10034== Releasing lock...  
[2025-03-18 21:31:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:31:21] Production.INFO: 38.5 MB  #Memory Used#   
[2025-03-18 21:32:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:32:06
    [end_date_ymd] => 2025-03-18 21:32:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:32:06' and `end` < '2025-03-18 21: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-18 21:32:18] Production.INFO: count ==1406  
[2025-03-18 21:32:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:32:06 - End Time 2025-03-18 21:32:06  
[2025-03-18 21:32:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710930', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710930', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710930', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:32:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710930', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:32:19] Production.INFO: ProcessCDR(1,14710930,1,1,2)  
[2025-03-18 21:32:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:32:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710930,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:32:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:32:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710930,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710930', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:32:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710930', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:32:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:32:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:32:24] Production.INFO: ==10109== Releasing lock...  
[2025-03-18 21:32:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:32:24] Production.INFO: 38.5 MB  #Memory Used#   
[2025-03-18 21:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:33:05
    [end_date_ymd] => 2025-03-18 21:33:05
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:33:05' and `end` < '2025-03-18 21: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-18 21:33:17] Production.INFO: count ==1401  
[2025-03-18 21:33:17] Production.ERROR: pbx CDR StartTime 2025-03-18 18:33:05 - End Time 2025-03-18 21:33:05  
[2025-03-18 21:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710935', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710935', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710935', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710935', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:33:17] Production.INFO: ProcessCDR(1,14710935,1,1,2)  
[2025-03-18 21:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710935,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:33:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710935,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710935', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:33:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710935', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:33:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:33:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:33:21] Production.INFO: ==10179== Releasing lock...  
[2025-03-18 21:33:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:33:21] Production.INFO: 38.5 MB  #Memory Used#   
[2025-03-18 21:34:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:34:06
    [end_date_ymd] => 2025-03-18 21:34:06
    [RateCDR] => 1
)
  
[2025-03-18 21:34:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:34:06' and `end` < '2025-03-18 21:34:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:34:18] Production.INFO: count ==1395  
[2025-03-18 21:34:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:34:06 - End Time 2025-03-18 21:34:06  
[2025-03-18 21:34:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:34:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710940', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710940', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710940', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:34:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710940', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:34:19] Production.INFO: ProcessCDR(1,14710940,1,1,2)  
[2025-03-18 21:34:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:34:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710940,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:34:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:34:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710940,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710940', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:34:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710940', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:34:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:34:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:34:22] Production.INFO: ==10258== Releasing lock...  
[2025-03-18 21:34:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:34:22] Production.INFO: 38.75 MB  #Memory Used#   
[2025-03-18 21:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:35:05
    [end_date_ymd] => 2025-03-18 21:35:05
    [RateCDR] => 1
)
  
[2025-03-18 21:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:35:05' and `end` < '2025-03-18 21:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:35:18] Production.INFO: count ==1391  
[2025-03-18 21:35:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:35:05 - End Time 2025-03-18 21:35:05  
[2025-03-18 21:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710945', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710945', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710945', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710945', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:35:18] Production.INFO: ProcessCDR(1,14710945,1,1,2)  
[2025-03-18 21:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710945,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:35:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710945,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710945', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:35:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710945', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:35:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:35:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:35:22] Production.INFO: ==10334== Releasing lock...  
[2025-03-18 21:35:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:35:22] Production.INFO: 38.75 MB  #Memory Used#   
[2025-03-18 21:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:36:06
    [end_date_ymd] => 2025-03-18 21:36:06
    [RateCDR] => 1
)
  
[2025-03-18 21:36:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:36:06' and `end` < '2025-03-18 21:36:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:36:18] Production.INFO: count ==1379  
[2025-03-18 21:36:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:36:06 - End Time 2025-03-18 21:36:06  
[2025-03-18 21:36:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710950', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710950', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710950', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:36:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710950', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:36:19] Production.INFO: ProcessCDR(1,14710950,1,1,2)  
[2025-03-18 21:36:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:36:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710950,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:36:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:36:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710950,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710950', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:36:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710950', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:36:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:36:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:36:23] Production.INFO: ==10409== Releasing lock...  
[2025-03-18 21:36:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:36:23] Production.INFO: 38.5 MB  #Memory Used#   
[2025-03-18 21:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:37:05
    [end_date_ymd] => 2025-03-18 21:37:05
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:37:05' and `end` < '2025-03-18 21: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-18 21:37:17] Production.INFO: count ==1375  
[2025-03-18 21:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:37:05 - End Time 2025-03-18 21:37:05  
[2025-03-18 21:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710955', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710955', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710955', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710955', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:37:18] Production.INFO: ProcessCDR(1,14710955,1,1,2)  
[2025-03-18 21:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710955,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710955,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710955', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710955', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:37:21] Production.INFO: ==10481== Releasing lock...  
[2025-03-18 21:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:37:21] Production.INFO: 38.75 MB  #Memory Used#   
[2025-03-18 21:38:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:38:06
    [end_date_ymd] => 2025-03-18 21:38:06
    [RateCDR] => 1
)
  
[2025-03-18 21:38:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:38:06' and `end` < '2025-03-18 21:38:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:38:18] Production.INFO: count ==1369  
[2025-03-18 21:38:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:38:06 - End Time 2025-03-18 21:38:06  
[2025-03-18 21:38:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710960', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710960', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710960', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:38:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710960', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:38:19] Production.INFO: ProcessCDR(1,14710960,1,1,2)  
[2025-03-18 21:38:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:38:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710960,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:38:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:38:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710960,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710960', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710960', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:38:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:38:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:38:22] Production.INFO: ==10608== Releasing lock...  
[2025-03-18 21:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:38:22] Production.INFO: 38.25 MB  #Memory Used#   
[2025-03-18 21:39:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:39:06
    [end_date_ymd] => 2025-03-18 21:39:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:39:06' and `end` < '2025-03-18 21: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-18 21:39:18] Production.INFO: count ==1361  
[2025-03-18 21:39:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:39:06 - End Time 2025-03-18 21:39:06  
[2025-03-18 21:39:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710965', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710965', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710965', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:39:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710965', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:39:18] Production.INFO: ProcessCDR(1,14710965,1,1,2)  
[2025-03-18 21:39:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:39:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710965,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:39:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:39:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710965,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710965', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:39:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710965', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:39:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:39:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:39:22] Production.INFO: ==10685== Releasing lock...  
[2025-03-18 21:39:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:39:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:40:07] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:40:07
    [end_date_ymd] => 2025-03-18 21:40:07
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:40:07' and `end` < '2025-03-18 21: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-18 21:40:19] Production.INFO: count ==1353  
[2025-03-18 21:40:20] Production.ERROR: pbx CDR StartTime 2025-03-18 18:40:07 - End Time 2025-03-18 21:40:07  
[2025-03-18 21:40:20] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710971', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710971', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710971', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:40:20] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710971', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:40:20] Production.INFO: ProcessCDR(1,14710971,1,1,2)  
[2025-03-18 21:40:20] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:40:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710971,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:40:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:40:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710971,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710971', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:40:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710971', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:40:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:40:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:40:23] Production.INFO: ==10762== Releasing lock...  
[2025-03-18 21:40:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:40:23] Production.INFO: 38.5 MB  #Memory Used#   
[2025-03-18 21:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:41:05
    [end_date_ymd] => 2025-03-18 21:41:05
    [RateCDR] => 1
)
  
[2025-03-18 21:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:41:05' and `end` < '2025-03-18 21:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:41:17] Production.INFO: count ==1305  
[2025-03-18 21:41:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:41:05 - End Time 2025-03-18 21:41:05  
[2025-03-18 21:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710976', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710976', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710976', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710976', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:41:18] Production.INFO: ProcessCDR(1,14710976,1,1,2)  
[2025-03-18 21:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710976,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710976,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710976', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710976', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:41:21] Production.INFO: ==10845== Releasing lock...  
[2025-03-18 21:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:41:21] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:42:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:42:06
    [end_date_ymd] => 2025-03-18 21:42:06
    [RateCDR] => 1
)
  
[2025-03-18 21:42:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:42:06' and `end` < '2025-03-18 21:42:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:42:18] Production.INFO: count ==1309  
[2025-03-18 21:42:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:42:06 - End Time 2025-03-18 21:42:06  
[2025-03-18 21:42:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710981', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710981', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710981', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:42:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710981', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:42:18] Production.INFO: ProcessCDR(1,14710981,1,1,2)  
[2025-03-18 21:42:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:42:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710981,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:42:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:42:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710981,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710981', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:42:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710981', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:42:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:42:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:42:22] Production.INFO: ==10929== Releasing lock...  
[2025-03-18 21:42:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:42:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:43:05
    [end_date_ymd] => 2025-03-18 21:43:05
    [RateCDR] => 1
)
  
[2025-03-18 21:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:43:05' and `end` < '2025-03-18 21:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:43:17] Production.INFO: count ==1311  
[2025-03-18 21:43:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:43:05 - End Time 2025-03-18 21:43:05  
[2025-03-18 21:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710986', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710986', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710986', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710986', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:43:18] Production.INFO: ProcessCDR(1,14710986,1,1,2)  
[2025-03-18 21:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710986,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:43:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710986,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710986', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:43:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710986', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:43:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:43:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:43:21] Production.INFO: ==11005== Releasing lock...  
[2025-03-18 21:43:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:43:21] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:44:06
    [end_date_ymd] => 2025-03-18 21:44:06
    [RateCDR] => 1
)
  
[2025-03-18 21:44:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:44:06' and `end` < '2025-03-18 21:44:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:44:18] Production.INFO: count ==1309  
[2025-03-18 21:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:44:06 - End Time 2025-03-18 21:44:06  
[2025-03-18 21:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710991', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710991', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710991', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710991', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:44:18] Production.INFO: ProcessCDR(1,14710991,1,1,2)  
[2025-03-18 21:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:44:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710991,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:44:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:44:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710991,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710991', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:44:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710991', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:44:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:44:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:44:22] Production.INFO: ==11088== Releasing lock...  
[2025-03-18 21:44:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:44:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:45:05
    [end_date_ymd] => 2025-03-18 21:45:05
    [RateCDR] => 1
)
  
[2025-03-18 21:45:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:45:05' and `end` < '2025-03-18 21:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:45:17] Production.INFO: count ==1309  
[2025-03-18 21:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:45:05 - End Time 2025-03-18 21:45:05  
[2025-03-18 21:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710996', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14710996', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710996', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14710996', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:45:18] Production.INFO: ProcessCDR(1,14710996,1,1,2)  
[2025-03-18 21:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14710996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14710996,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14710996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14710996,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710996', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14710996', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:45:21] Production.INFO: ==11167== Releasing lock...  
[2025-03-18 21:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:45:21] Production.INFO: 38.25 MB  #Memory Used#   
[2025-03-18 21:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:46:05
    [end_date_ymd] => 2025-03-18 21:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:46:05' and `end` < '2025-03-18 21: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-18 21:46:18] Production.INFO: count ==1319  
[2025-03-18 21:46:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:46:05 - End Time 2025-03-18 21:46:05  
[2025-03-18 21:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711001', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711001', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711001', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711001', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:46:18] Production.INFO: ProcessCDR(1,14711001,1,1,2)  
[2025-03-18 21:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711001,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:46:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711001,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711001', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:46:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711001', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:46:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:46:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:46:22] Production.INFO: ==11245== Releasing lock...  
[2025-03-18 21:46:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:46:22] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 21:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:47:05
    [end_date_ymd] => 2025-03-18 21:47:05
    [RateCDR] => 1
)
  
[2025-03-18 21:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:47:05' and `end` < '2025-03-18 21:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:47:17] Production.INFO: count ==1322  
[2025-03-18 21:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:47:05 - End Time 2025-03-18 21:47:05  
[2025-03-18 21:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711006', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711006', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711006', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711006', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:47:18] Production.INFO: ProcessCDR(1,14711006,1,1,2)  
[2025-03-18 21:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711006,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711006,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711006', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711006', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:47:21] Production.INFO: ==11326== Releasing lock...  
[2025-03-18 21:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:47:21] Production.INFO: 38.25 MB  #Memory Used#   
[2025-03-18 21:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:48:05
    [end_date_ymd] => 2025-03-18 21:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:48:05' and `end` < '2025-03-18 21:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:48:18] Production.INFO: count ==1314  
[2025-03-18 21:48:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:48:05 - End Time 2025-03-18 21:48:05  
[2025-03-18 21:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711011', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711011', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711011', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711011', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:48:18] Production.INFO: ProcessCDR(1,14711011,1,1,2)  
[2025-03-18 21:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711011,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711011,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711011', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711011', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:48:21] Production.INFO: ==11410== Releasing lock...  
[2025-03-18 21:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:48:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 21:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:49:05
    [end_date_ymd] => 2025-03-18 21:49:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:49:05' and `end` < '2025-03-18 21:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:49:17] Production.INFO: count ==1311  
[2025-03-18 21:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:49:05 - End Time 2025-03-18 21:49:05  
[2025-03-18 21:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711016', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711016', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711016', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711016', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:49:18] Production.INFO: ProcessCDR(1,14711016,1,1,2)  
[2025-03-18 21:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711016,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711016,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711016', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711016', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:49:21] Production.INFO: ==11492== Releasing lock...  
[2025-03-18 21:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:49:21] Production.INFO: 38.25 MB  #Memory Used#   
[2025-03-18 21:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:50:06
    [end_date_ymd] => 2025-03-18 21:50:06
    [RateCDR] => 1
)
  
[2025-03-18 21:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:50:06' and `end` < '2025-03-18 21:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:50:19] Production.INFO: count ==1315  
[2025-03-18 21:50:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:50:06 - End Time 2025-03-18 21:50:06  
[2025-03-18 21:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711022', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711022', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711022', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711022', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:50:19] Production.INFO: ProcessCDR(1,14711022,1,1,2)  
[2025-03-18 21:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711022,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711022,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711022', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:50:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711022', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:50:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:50:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:50:23] Production.INFO: ==11578== Releasing lock...  
[2025-03-18 21:50:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:50:23] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:51:05
    [end_date_ymd] => 2025-03-18 21:51:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 18:51:05' and `end` < '2025-03-18 21:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:51:18] Production.INFO: count ==1301  
[2025-03-18 21:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:51:05 - End Time 2025-03-18 21:51:05  
[2025-03-18 21:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711027', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711027', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711027', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711027', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:51:18] Production.INFO: ProcessCDR(1,14711027,1,1,2)  
[2025-03-18 21:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:51:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711027,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:51:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:51:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711027,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711027', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711027', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:51:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:51:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:51:23] Production.INFO: ==11664== Releasing lock...  
[2025-03-18 21:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:51:23] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:52:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:52:06
    [end_date_ymd] => 2025-03-18 21:52:06
    [RateCDR] => 1
)
  
[2025-03-18 21:52:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:52:06' and `end` < '2025-03-18 21:52:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:52:18] Production.INFO: count ==1300  
[2025-03-18 21:52:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:52:06 - End Time 2025-03-18 21:52:06  
[2025-03-18 21:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711032', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711032', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711032', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711032', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:52:18] Production.INFO: ProcessCDR(1,14711032,1,1,2)  
[2025-03-18 21:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:52:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711032,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:52:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:52:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711032,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711032', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:52:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711032', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:52:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:52:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:52:22] Production.INFO: ==11752== Releasing lock...  
[2025-03-18 21:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:52:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:53:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:53:04
    [end_date_ymd] => 2025-03-18 21:53:04
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:53:04' and `end` < '2025-03-18 21: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-18 21:53:17] Production.INFO: count ==1298  
[2025-03-18 21:53:17] Production.ERROR: pbx CDR StartTime 2025-03-18 18:53:04 - End Time 2025-03-18 21:53:04  
[2025-03-18 21:53:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711037', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711037', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711037', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:53:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711037', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:53:17] Production.INFO: ProcessCDR(1,14711037,1,1,2)  
[2025-03-18 21:53:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:53:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711037,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:53:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711037,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711037', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711037', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:53:21] Production.INFO: ==11872== Releasing lock...  
[2025-03-18 21:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:53:21] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:54:06
    [end_date_ymd] => 2025-03-18 21:54:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:54:06' and `end` < '2025-03-18 21: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-18 21:54:18] Production.INFO: count ==1300  
[2025-03-18 21:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:54:06 - End Time 2025-03-18 21:54:06  
[2025-03-18 21:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711042', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711042', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711042', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711042', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:54:18] Production.INFO: ProcessCDR(1,14711042,1,1,2)  
[2025-03-18 21:54:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:54:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711042,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:54:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711042,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711042', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711042', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:54:22] Production.INFO: ==11963== Releasing lock...  
[2025-03-18 21:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:54:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:55:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:55:04
    [end_date_ymd] => 2025-03-18 21:55:04
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:55:04' and `end` < '2025-03-18 21: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-18 21:55:17] Production.INFO: count ==1297  
[2025-03-18 21:55:17] Production.ERROR: pbx CDR StartTime 2025-03-18 18:55:04 - End Time 2025-03-18 21:55:04  
[2025-03-18 21:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711047', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711047', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711047', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711047', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:55:17] Production.INFO: ProcessCDR(1,14711047,1,1,2)  
[2025-03-18 21:55:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:55:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711047,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:55:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:55:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711047,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711047', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:55:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711047', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:55:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:55:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:55:22] Production.INFO: ==12042== Releasing lock...  
[2025-03-18 21:55:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:55:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:56:05
    [end_date_ymd] => 2025-03-18 21:56:05
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:56:05' and `end` < '2025-03-18 21: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-18 21:56:18] Production.INFO: count ==1293  
[2025-03-18 21:56:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:56:05 - End Time 2025-03-18 21:56:05  
[2025-03-18 21:56:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711052', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711052', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711052', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:56:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711052', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:56:18] Production.INFO: ProcessCDR(1,14711052,1,1,2)  
[2025-03-18 21:56:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:56:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711052,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:56:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711052,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711052', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711052', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:56:21] Production.INFO: ==12126== Releasing lock...  
[2025-03-18 21:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:56:21] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 21:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:57:05
    [end_date_ymd] => 2025-03-18 21:57:05
    [RateCDR] => 1
)
  
[2025-03-18 21:57:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:57:05' and `end` < '2025-03-18 21:57:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:57:17] Production.INFO: count ==1292  
[2025-03-18 21:57:17] Production.ERROR: pbx CDR StartTime 2025-03-18 18:57:05 - End Time 2025-03-18 21:57:05  
[2025-03-18 21:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711057', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711057', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711057', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711057', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:57:17] Production.INFO: ProcessCDR(1,14711057,1,1,2)  
[2025-03-18 21:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711057,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711057,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711057', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711057', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:57:21] Production.INFO: ==12213== Releasing lock...  
[2025-03-18 21:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:57:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 21:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:58:06
    [end_date_ymd] => 2025-03-18 21:58:06
    [RateCDR] => 1
)
  
[2025-03-18 21:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 18:58:06' and `end` < '2025-03-18 21:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 21:58:18] Production.INFO: count ==1288  
[2025-03-18 21:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 18:58:06 - End Time 2025-03-18 21:58:06  
[2025-03-18 21:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711062', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711062', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711062', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711062', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:58:18] Production.INFO: ProcessCDR(1,14711062,1,1,2)  
[2025-03-18 21:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711062,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711062,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711062', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711062', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:58:22] Production.INFO: ==12296== Releasing lock...  
[2025-03-18 21:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:58:22] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 21:59:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 18:59:06
    [end_date_ymd] => 2025-03-18 21:59:06
    [RateCDR] => 1
)
  
[2025-03-18 21: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-18 18:59:06' and `end` < '2025-03-18 21: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-18 21:59:18] Production.INFO: count ==1287  
[2025-03-18 21:59:19] Production.ERROR: pbx CDR StartTime 2025-03-18 18:59:06 - End Time 2025-03-18 21:59:06  
[2025-03-18 21:59:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 21:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711067', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711067', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711067', 'tblTempVendorCDR_20' ) start  
[2025-03-18 21:59:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711067', 'tblTempVendorCDR_20' ) end  
[2025-03-18 21:59:19] Production.INFO: ProcessCDR(1,14711067,1,1,2)  
[2025-03-18 21:59:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:59:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711067,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 21:59:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:59:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711067,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 21:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711067', 'tblTempUsageDetail_20' ) start  
[2025-03-18 21:59:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711067', 'tblTempUsageDetail_20' ) end  
[2025-03-18 21:59:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 21:59:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 21:59:22] Production.INFO: ==12379== Releasing lock...  
[2025-03-18 21:59:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 21:59:22] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 22:00:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:00:05
    [end_date_ymd] => 2025-03-18 22:00:05
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:00:05' and `end` < '2025-03-18 22: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-18 22:00:18] Production.INFO: count ==1286  
[2025-03-18 22:00:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:00:05 - End Time 2025-03-18 22:00:05  
[2025-03-18 22:00:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711073', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711073', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711073', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:00:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711073', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:00:18] Production.INFO: ProcessCDR(1,14711073,1,1,2)  
[2025-03-18 22:00:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:00:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711073,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:00:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:00:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711073,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711073', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711073', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:00:23] Production.INFO: ==12466== Releasing lock...  
[2025-03-18 22:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:00:23] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:01:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:01:06
    [end_date_ymd] => 2025-03-18 22:01:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:01:06' and `end` < '2025-03-18 22: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-18 22:01:18] Production.INFO: count ==1251  
[2025-03-18 22:01:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:01:06 - End Time 2025-03-18 22:01:06  
[2025-03-18 22:01:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711078', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711078', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711078', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:01:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711078', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:01:18] Production.INFO: ProcessCDR(1,14711078,1,1,2)  
[2025-03-18 22:01:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:01:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711078,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:01:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:01:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711078,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711078', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:01:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711078', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:01:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:01:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:01:22] Production.INFO: ==12566== Releasing lock...  
[2025-03-18 22:01:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:01:22] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:02:05
    [end_date_ymd] => 2025-03-18 22:02:05
    [RateCDR] => 1
)
  
[2025-03-18 22:02:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:02:05' and `end` < '2025-03-18 22:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:02:17] Production.INFO: count ==1247  
[2025-03-18 22:02:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:02:05 - End Time 2025-03-18 22:02:05  
[2025-03-18 22:02:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711083', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711083', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711083', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:02:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711083', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:02:17] Production.INFO: ProcessCDR(1,14711083,1,1,2)  
[2025-03-18 22:02:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:02:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711083,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:02:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711083,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711083', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711083', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:02:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:02:21] Production.INFO: ==12647== Releasing lock...  
[2025-03-18 22:02:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:02:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:03:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:03:05
    [end_date_ymd] => 2025-03-18 22:03:05
    [RateCDR] => 1
)
  
[2025-03-18 22:03:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:03:05' and `end` < '2025-03-18 22:03:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:03:18] Production.INFO: count ==1245  
[2025-03-18 22:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:03:05 - End Time 2025-03-18 22:03:05  
[2025-03-18 22:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711088', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711088', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711088', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711088', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:03:18] Production.INFO: ProcessCDR(1,14711088,1,1,2)  
[2025-03-18 22:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:03:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711088,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:03:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:03:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711088,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711088', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:03:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711088', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:03:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:03:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:03:22] Production.INFO: ==12728== Releasing lock...  
[2025-03-18 22:03:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:03:22] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:04:05
    [end_date_ymd] => 2025-03-18 22:04:05
    [RateCDR] => 1
)
  
[2025-03-18 22:04:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:04:05' and `end` < '2025-03-18 22:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:04:18] Production.INFO: count ==1236  
[2025-03-18 22:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:04:05 - End Time 2025-03-18 22:04:05  
[2025-03-18 22:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711093', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711093', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711093', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711093', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:04:18] Production.INFO: ProcessCDR(1,14711093,1,1,2)  
[2025-03-18 22:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711093,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711093,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711093', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711093', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:04:21] Production.INFO: ==12809== Releasing lock...  
[2025-03-18 22:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:04:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:05:06
    [end_date_ymd] => 2025-03-18 22:05:06
    [RateCDR] => 1
)
  
[2025-03-18 22:05:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:05:06' and `end` < '2025-03-18 22:05:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:05:18] Production.INFO: count ==1241  
[2025-03-18 22:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:05:06 - End Time 2025-03-18 22:05:06  
[2025-03-18 22:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711098', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711098', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711098', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711098', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:05:18] Production.INFO: ProcessCDR(1,14711098,1,1,2)  
[2025-03-18 22:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711098,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:05:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711098,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711098', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:05:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711098', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:05:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:05:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:05:21] Production.INFO: ==12894== Releasing lock...  
[2025-03-18 22:05:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:05:21] Production.INFO: 38 MB  #Memory Used#   
[2025-03-18 22:06:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:06:05
    [end_date_ymd] => 2025-03-18 22:06:05
    [RateCDR] => 1
)
  
[2025-03-18 22:06:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:06:05' and `end` < '2025-03-18 22:06:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:06:17] Production.INFO: count ==1238  
[2025-03-18 22:06:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:06:05 - End Time 2025-03-18 22:06:05  
[2025-03-18 22:06:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711103', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711103', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711103', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:06:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711103', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:06:17] Production.INFO: ProcessCDR(1,14711103,1,1,2)  
[2025-03-18 22:06:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:06:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711103,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:06:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:06:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711103,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711103', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:06:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711103', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:06:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:06:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:06:21] Production.INFO: ==12974== Releasing lock...  
[2025-03-18 22:06:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:06:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:07:06
    [end_date_ymd] => 2025-03-18 22:07:06
    [RateCDR] => 1
)
  
[2025-03-18 22:07:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:07:06' and `end` < '2025-03-18 22:07:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:07:18] Production.INFO: count ==1248  
[2025-03-18 22:07:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:07:06 - End Time 2025-03-18 22:07:06  
[2025-03-18 22:07:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711108', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711108', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711108', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:07:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711108', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:07:18] Production.INFO: ProcessCDR(1,14711108,1,1,2)  
[2025-03-18 22:07:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:07:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711108,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:07:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:07:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711108,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711108', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:07:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711108', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:07:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:07:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:07:22] Production.INFO: ==13057== Releasing lock...  
[2025-03-18 22:07:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:07:22] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:08:05
    [end_date_ymd] => 2025-03-18 22:08:05
    [RateCDR] => 1
)
  
[2025-03-18 22:08:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:08:05' and `end` < '2025-03-18 22:08:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:08:17] Production.INFO: count ==1247  
[2025-03-18 22:08:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:08:05 - End Time 2025-03-18 22:08:05  
[2025-03-18 22:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711113', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711113', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711113', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711113', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:08:18] Production.INFO: ProcessCDR(1,14711113,1,1,2)  
[2025-03-18 22:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:08:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711113,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:08:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:08:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711113,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711113', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:08:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711113', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:08:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:08:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:08:22] Production.INFO: ==13137== Releasing lock...  
[2025-03-18 22:08:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:08:22] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:09:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:09:06
    [end_date_ymd] => 2025-03-18 22:09:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:09:06' and `end` < '2025-03-18 22: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-18 22:09:18] Production.INFO: count ==1251  
[2025-03-18 22:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:09:06 - End Time 2025-03-18 22:09:06  
[2025-03-18 22:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711118', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711118', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711118', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711118', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:09:18] Production.INFO: ProcessCDR(1,14711118,1,1,2)  
[2025-03-18 22:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711118,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:09:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711118,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711118', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:09:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711118', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:09:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:09:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:09:21] Production.INFO: ==13251== Releasing lock...  
[2025-03-18 22:09:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:09:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:10:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:10:05
    [end_date_ymd] => 2025-03-18 22:10:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:10:05' and `end` < '2025-03-18 22: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-18 22:10:17] Production.INFO: count ==1250  
[2025-03-18 22:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:10:05 - End Time 2025-03-18 22:10:05  
[2025-03-18 22:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711124', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711124', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711124', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711124', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:10:18] Production.INFO: ProcessCDR(1,14711124,1,1,2)  
[2025-03-18 22:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:10:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711124,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:10:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:10:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711124,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711124', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:10:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711124', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:10:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:10:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:10:21] Production.INFO: ==13332== Releasing lock...  
[2025-03-18 22:10:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:10:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:11:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:11:05
    [end_date_ymd] => 2025-03-18 22:11:05
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:11:05' and `end` < '2025-03-18 22: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-18 22:11:18] Production.INFO: count ==1207  
[2025-03-18 22:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:11:05 - End Time 2025-03-18 22:11:05  
[2025-03-18 22:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711129', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711129', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711129', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711129', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:11:18] Production.INFO: ProcessCDR(1,14711129,1,1,2)  
[2025-03-18 22:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:11:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711129,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:11:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:11:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711129,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711129', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711129', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:11:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:11:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:11:23] Production.INFO: ==13414== Releasing lock...  
[2025-03-18 22:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:11:23] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:12:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:12:05
    [end_date_ymd] => 2025-03-18 22:12:05
    [RateCDR] => 1
)
  
[2025-03-18 22:12:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:12:05' and `end` < '2025-03-18 22:12:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:12:17] Production.INFO: count ==1203  
[2025-03-18 22:12:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:12:05 - End Time 2025-03-18 22:12:05  
[2025-03-18 22:12:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711134', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711134', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711134', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:12:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711134', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:12:17] Production.INFO: ProcessCDR(1,14711134,1,1,2)  
[2025-03-18 22:12:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:12:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711134,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:12:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:12:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711134,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711134', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:12:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711134', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:12:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:12:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:12:21] Production.INFO: ==13488== Releasing lock...  
[2025-03-18 22:12:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:12:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:13:04
    [end_date_ymd] => 2025-03-18 22:13:04
    [RateCDR] => 1
)
  
[2025-03-18 22:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:13:04' and `end` < '2025-03-18 22: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-18 22:13:17] Production.INFO: count ==1206  
[2025-03-18 22:13:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:13:04 - End Time 2025-03-18 22:13:04  
[2025-03-18 22:13:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711139', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711139', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711139', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:13:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711139', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:13:17] Production.INFO: ProcessCDR(1,14711139,1,1,2)  
[2025-03-18 22:13:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:13:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711139,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:13:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711139,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711139', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711139', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:13:21] Production.INFO: ==13568== Releasing lock...  
[2025-03-18 22:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:13:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:14:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:14:06
    [end_date_ymd] => 2025-03-18 22:14:06
    [RateCDR] => 1
)
  
[2025-03-18 22:14:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:14:06' and `end` < '2025-03-18 22:14:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:14:18] Production.INFO: count ==1210  
[2025-03-18 22:14:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:14:06 - End Time 2025-03-18 22:14:06  
[2025-03-18 22:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711144', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711144', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711144', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711144', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:14:18] Production.INFO: ProcessCDR(1,14711144,1,1,2)  
[2025-03-18 22:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711144,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:14:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711144,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711144', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:14:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711144', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:14:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:14:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:14:22] Production.INFO: ==13644== Releasing lock...  
[2025-03-18 22:14:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:14:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:15:05
    [end_date_ymd] => 2025-03-18 22:15:05
    [RateCDR] => 1
)
  
[2025-03-18 22:15:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:15:05' and `end` < '2025-03-18 22:15:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:15:17] Production.INFO: count ==1213  
[2025-03-18 22:15:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:15:05 - End Time 2025-03-18 22:15:05  
[2025-03-18 22:15:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711149', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711149', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711149', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:15:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711149', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:15:18] Production.INFO: ProcessCDR(1,14711149,1,1,2)  
[2025-03-18 22:15:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:15:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711149,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:15:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711149,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711149', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711149', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:15:21] Production.INFO: ==13719== Releasing lock...  
[2025-03-18 22:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:15:21] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:16:06
    [end_date_ymd] => 2025-03-18 22:16:06
    [RateCDR] => 1
)
  
[2025-03-18 22:16:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:16:06' and `end` < '2025-03-18 22:16:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:16:18] Production.INFO: count ==1213  
[2025-03-18 22:16:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:16:06 - End Time 2025-03-18 22:16:06  
[2025-03-18 22:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711154', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711154', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711154', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711154', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:16:18] Production.INFO: ProcessCDR(1,14711154,1,1,2)  
[2025-03-18 22:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711154,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:16:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711154,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711154', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711154', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:16:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:16:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:16:22] Production.INFO: ==13797== Releasing lock...  
[2025-03-18 22:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:16:22] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:17:05
    [end_date_ymd] => 2025-03-18 22:17:05
    [RateCDR] => 1
)
  
[2025-03-18 22:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:17:05' and `end` < '2025-03-18 22:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:17:17] Production.INFO: count ==1200  
[2025-03-18 22:17:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:17:05 - End Time 2025-03-18 22:17:05  
[2025-03-18 22:17:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711159', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711159', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711159', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:17:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711159', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:17:18] Production.INFO: ProcessCDR(1,14711159,1,1,2)  
[2025-03-18 22:17:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:17:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711159,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:17:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:17:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711159,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711159', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:17:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711159', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:17:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:17:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:17:23] Production.INFO: ==13877== Releasing lock...  
[2025-03-18 22:17:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:17:23] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:18:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:18:05
    [end_date_ymd] => 2025-03-18 22:18:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:18:05' and `end` < '2025-03-18 22:18:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:18:18] Production.INFO: count ==1195  
[2025-03-18 22:18:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:18:05 - End Time 2025-03-18 22:18:05  
[2025-03-18 22:18:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711164', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711164', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711164', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:18:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711164', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:18:18] Production.INFO: ProcessCDR(1,14711164,1,1,2)  
[2025-03-18 22:18:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:18:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711164,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:18:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:18:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711164,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711164', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:18:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711164', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:18:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:18:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:18:21] Production.INFO: ==13954== Releasing lock...  
[2025-03-18 22:18:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:18:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:19:05
    [end_date_ymd] => 2025-03-18 22:19:05
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:19:05' and `end` < '2025-03-18 22: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-18 22:19:17] Production.INFO: count ==1195  
[2025-03-18 22:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:19:05 - End Time 2025-03-18 22:19:05  
[2025-03-18 22:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711169', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711169', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711169', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711169', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:19:18] Production.INFO: ProcessCDR(1,14711169,1,1,2)  
[2025-03-18 22:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711169,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711169,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711169', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711169', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:19:21] Production.INFO: ==14035== Releasing lock...  
[2025-03-18 22:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:19:21] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:20:06
    [end_date_ymd] => 2025-03-18 22:20:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:20:06' and `end` < '2025-03-18 22: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-18 22:20:18] Production.INFO: count ==1195  
[2025-03-18 22:20:19] Production.ERROR: pbx CDR StartTime 2025-03-18 19:20:06 - End Time 2025-03-18 22:20:06  
[2025-03-18 22:20:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711175', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711175', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711175', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711175', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:20:19] Production.INFO: ProcessCDR(1,14711175,1,1,2)  
[2025-03-18 22:20:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:20:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711175,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:20:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:20:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711175,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:20:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711175', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:20:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711175', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:20:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:20:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:20:24] Production.INFO: ==14119== Releasing lock...  
[2025-03-18 22:20:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:20:24] Production.INFO: 37.75 MB  #Memory Used#   
[2025-03-18 22:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:21:05
    [end_date_ymd] => 2025-03-18 22:21:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:21:05' and `end` < '2025-03-18 22:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:21:17] Production.INFO: count ==1180  
[2025-03-18 22:21:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:21:05 - End Time 2025-03-18 22:21:05  
[2025-03-18 22:21:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711180', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711180', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711180', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:21:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711180', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:21:18] Production.INFO: ProcessCDR(1,14711180,1,1,2)  
[2025-03-18 22:21:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:21:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711180,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:21:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:21:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711180,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711180', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:21:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711180', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:21:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:21:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:21:23] Production.INFO: ==14193== Releasing lock...  
[2025-03-18 22:21:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:21:23] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:22:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:22:05
    [end_date_ymd] => 2025-03-18 22:22:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:22:05' and `end` < '2025-03-18 22: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-18 22:22:18] Production.INFO: count ==1180  
[2025-03-18 22:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:22:05 - End Time 2025-03-18 22:22:05  
[2025-03-18 22:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711185', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711185', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711185', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711185', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:22:18] Production.INFO: ProcessCDR(1,14711185,1,1,2)  
[2025-03-18 22:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:22:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711185,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:22:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:22:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711185,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711185', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:22:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711185', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:22:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:22:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:22:23] Production.INFO: ==14269== Releasing lock...  
[2025-03-18 22:22:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:22:23] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:23:05
    [end_date_ymd] => 2025-03-18 22:23:05
    [RateCDR] => 1
)
  
[2025-03-18 22:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:23:05' and `end` < '2025-03-18 22:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:23:17] Production.INFO: count ==1177  
[2025-03-18 22:23:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:23:05 - End Time 2025-03-18 22:23:05  
[2025-03-18 22:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711190', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711190', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711190', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:23:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711190', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:23:18] Production.INFO: ProcessCDR(1,14711190,1,1,2)  
[2025-03-18 22:23:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711190,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711190,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711190', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711190', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:23:21] Production.INFO: ==14346== Releasing lock...  
[2025-03-18 22:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:23:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:24:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:24:06
    [end_date_ymd] => 2025-03-18 22:24:06
    [RateCDR] => 1
)
  
[2025-03-18 22:24:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:24:06' and `end` < '2025-03-18 22:24:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:24:18] Production.INFO: count ==1188  
[2025-03-18 22:24:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:24:06 - End Time 2025-03-18 22:24:06  
[2025-03-18 22:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711195', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711195', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711195', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711195', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:24:18] Production.INFO: ProcessCDR(1,14711195,1,1,2)  
[2025-03-18 22:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711195,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:24:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711195,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711195', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:24:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711195', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:24:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:24:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:24:22] Production.INFO: ==14457== Releasing lock...  
[2025-03-18 22:24:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:24:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:25:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:25:04
    [end_date_ymd] => 2025-03-18 22:25:04
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:25:04' and `end` < '2025-03-18 22: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-18 22:25:17] Production.INFO: count ==1188  
[2025-03-18 22:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:25:04 - End Time 2025-03-18 22:25:04  
[2025-03-18 22:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711200', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711200', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711200', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711200', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:25:17] Production.INFO: ProcessCDR(1,14711200,1,1,2)  
[2025-03-18 22:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711200,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:25:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711200,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711200', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:25:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711200', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:25:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:25:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:25:20] Production.INFO: ==14532== Releasing lock...  
[2025-03-18 22:25:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:25:20] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:26:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:26:05
    [end_date_ymd] => 2025-03-18 22:26:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:26:05' and `end` < '2025-03-18 22: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-18 22:26:18] Production.INFO: count ==1191  
[2025-03-18 22:26:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:26:05 - End Time 2025-03-18 22:26:05  
[2025-03-18 22:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711205', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711205', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711205', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711205', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:26:18] Production.INFO: ProcessCDR(1,14711205,1,1,2)  
[2025-03-18 22:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711205,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:26:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711205,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711205', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:26:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711205', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:26:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:26:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:26:21] Production.INFO: ==14606== Releasing lock...  
[2025-03-18 22:26:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:26:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:27:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:27:04
    [end_date_ymd] => 2025-03-18 22:27:04
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:27:04' and `end` < '2025-03-18 22: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-18 22:27:16] Production.INFO: count ==1192  
[2025-03-18 22:27:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:27:04 - End Time 2025-03-18 22:27:04  
[2025-03-18 22:27:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711210', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711210', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711210', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:27:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711210', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:27:17] Production.INFO: ProcessCDR(1,14711210,1,1,2)  
[2025-03-18 22:27:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:27:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711210,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:27:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:27:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711210,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711210', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:27:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711210', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:27:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:27:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:27:20] Production.INFO: ==14680== Releasing lock...  
[2025-03-18 22:27:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:27:20] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:28:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:28:05
    [end_date_ymd] => 2025-03-18 22:28:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:28:05' and `end` < '2025-03-18 22:28:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:28:17] Production.INFO: count ==1200  
[2025-03-18 22:28:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:28:05 - End Time 2025-03-18 22:28:05  
[2025-03-18 22:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711215', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711215', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711215', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711215', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:28:18] Production.INFO: ProcessCDR(1,14711215,1,1,2)  
[2025-03-18 22:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:28:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711215,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:28:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:28:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711215,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711215', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:28:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711215', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:28:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:28:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:28:23] Production.INFO: ==14751== Releasing lock...  
[2025-03-18 22:28:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:28:23] Production.INFO: 37.5 MB  #Memory Used#   
[2025-03-18 22:29:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:29:06
    [end_date_ymd] => 2025-03-18 22:29:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:29:06' and `end` < '2025-03-18 22: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-18 22:29:18] Production.INFO: count ==1201  
[2025-03-18 22:29:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:29:06 - End Time 2025-03-18 22:29:06  
[2025-03-18 22:29:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711220', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711220', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711220', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:29:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711220', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:29:18] Production.INFO: ProcessCDR(1,14711220,1,1,2)  
[2025-03-18 22:29:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711220,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711220,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711220', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711220', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:29:21] Production.INFO: ==14826== Releasing lock...  
[2025-03-18 22:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:29:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:30:06
    [end_date_ymd] => 2025-03-18 22:30:06
    [RateCDR] => 1
)
  
[2025-03-18 22:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:30:06' and `end` < '2025-03-18 22:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:30:18] Production.INFO: count ==1205  
[2025-03-18 22:30:19] Production.ERROR: pbx CDR StartTime 2025-03-18 19:30:06 - End Time 2025-03-18 22:30:06  
[2025-03-18 22:30:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711226', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711226', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711226', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:30:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711226', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:30:19] Production.INFO: ProcessCDR(1,14711226,1,1,2)  
[2025-03-18 22:30:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:30:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711226,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:30:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711226,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711226', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711226', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:30:22] Production.INFO: ==14900== Releasing lock...  
[2025-03-18 22:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:30:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:31:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:31:06
    [end_date_ymd] => 2025-03-18 22:31:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:31:06' and `end` < '2025-03-18 22: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-18 22:31:18] Production.INFO: count ==1179  
[2025-03-18 22:31:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:31:06 - End Time 2025-03-18 22:31:06  
[2025-03-18 22:31:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711231', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711231', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711231', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:31:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711231', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:31:18] Production.INFO: ProcessCDR(1,14711231,1,1,2)  
[2025-03-18 22:31:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:31:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711231,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:31:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:31:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711231,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711231', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711231', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:31:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:31:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:31:22] Production.INFO: ==14977== Releasing lock...  
[2025-03-18 22:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:31:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:32:05
    [end_date_ymd] => 2025-03-18 22:32:05
    [RateCDR] => 1
)
  
[2025-03-18 22:32:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:32:05' and `end` < '2025-03-18 22:32:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:32:18] Production.INFO: count ==1176  
[2025-03-18 22:32:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:32:05 - End Time 2025-03-18 22:32:05  
[2025-03-18 22:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711236', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711236', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711236', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711236', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:32:18] Production.INFO: ProcessCDR(1,14711236,1,1,2)  
[2025-03-18 22:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711236,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711236,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711236', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711236', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:32:21] Production.INFO: ==15046== Releasing lock...  
[2025-03-18 22:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:32:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:33:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:33:06
    [end_date_ymd] => 2025-03-18 22:33:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:33:06' and `end` < '2025-03-18 22: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-18 22:33:18] Production.INFO: count ==1174  
[2025-03-18 22:33:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:33:06 - End Time 2025-03-18 22:33:06  
[2025-03-18 22:33:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711241', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711241', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711241', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:33:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711241', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:33:18] Production.INFO: ProcessCDR(1,14711241,1,1,2)  
[2025-03-18 22:33:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:33:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711241,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:33:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:33:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711241,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711241', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:33:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711241', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:33:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:33:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:33:22] Production.INFO: ==15123== Releasing lock...  
[2025-03-18 22:33:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:33:22] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:34:05
    [end_date_ymd] => 2025-03-18 22:34:05
    [RateCDR] => 1
)
  
[2025-03-18 22:34:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:34:05' and `end` < '2025-03-18 22:34:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:34:17] Production.INFO: count ==1169  
[2025-03-18 22:34:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:34:05 - End Time 2025-03-18 22:34:05  
[2025-03-18 22:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711246', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711246', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711246', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711246', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:34:17] Production.INFO: ProcessCDR(1,14711246,1,1,2)  
[2025-03-18 22:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711246,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711246,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711246', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711246', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:34:21] Production.INFO: ==15195== Releasing lock...  
[2025-03-18 22:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:34:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:35:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:35:05
    [end_date_ymd] => 2025-03-18 22:35:05
    [RateCDR] => 1
)
  
[2025-03-18 22:35:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:35:05' and `end` < '2025-03-18 22:35:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:35:18] Production.INFO: count ==1159  
[2025-03-18 22:35:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:35:05 - End Time 2025-03-18 22:35:05  
[2025-03-18 22:35:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711251', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711251', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711251', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:35:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711251', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:35:18] Production.INFO: ProcessCDR(1,14711251,1,1,2)  
[2025-03-18 22:35:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:35:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711251,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:35:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:35:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711251,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711251', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:35:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711251', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:35:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:35:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:35:21] Production.INFO: ==15267== Releasing lock...  
[2025-03-18 22:35:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:35:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:36:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:36:05
    [end_date_ymd] => 2025-03-18 22:36:05
    [RateCDR] => 1
)
  
[2025-03-18 22:36:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:36:05' and `end` < '2025-03-18 22:36:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:36:17] Production.INFO: count ==1161  
[2025-03-18 22:36:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:36:05 - End Time 2025-03-18 22:36:05  
[2025-03-18 22:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711256', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711256', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711256', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711256', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:36:18] Production.INFO: ProcessCDR(1,14711256,1,1,2)  
[2025-03-18 22:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711256,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711256,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711256', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711256', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:36:21] Production.INFO: ==15344== Releasing lock...  
[2025-03-18 22:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:36:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:37:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:37:06
    [end_date_ymd] => 2025-03-18 22:37:06
    [RateCDR] => 1
)
  
[2025-03-18 22:37:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:37:06' and `end` < '2025-03-18 22:37:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:37:18] Production.INFO: count ==1166  
[2025-03-18 22:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:37:06 - End Time 2025-03-18 22:37:06  
[2025-03-18 22:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711261', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711261', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711261', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711261', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:37:18] Production.INFO: ProcessCDR(1,14711261,1,1,2)  
[2025-03-18 22:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711261,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:37:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711261,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711261', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:37:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711261', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:37:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:37:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:37:22] Production.INFO: ==15419== Releasing lock...  
[2025-03-18 22:37:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:37:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:38:05
    [end_date_ymd] => 2025-03-18 22:38:05
    [RateCDR] => 1
)
  
[2025-03-18 22:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:38:05' and `end` < '2025-03-18 22:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:38:17] Production.INFO: count ==1167  
[2025-03-18 22:38:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:38:05 - End Time 2025-03-18 22:38:05  
[2025-03-18 22:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711266', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711266', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711266', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:38:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711266', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:38:18] Production.INFO: ProcessCDR(1,14711266,1,1,2)  
[2025-03-18 22:38:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:38:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711266,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:38:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:38:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711266,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711266', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:38:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711266', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:38:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:38:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:38:21] Production.INFO: ==15492== Releasing lock...  
[2025-03-18 22:38:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:38:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:39:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:39:05
    [end_date_ymd] => 2025-03-18 22:39:05
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:39:05' and `end` < '2025-03-18 22: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-18 22:39:17] Production.INFO: count ==1169  
[2025-03-18 22:39:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:39:05 - End Time 2025-03-18 22:39:05  
[2025-03-18 22:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711271', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711271', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711271', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711271', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:39:17] Production.INFO: ProcessCDR(1,14711271,1,1,2)  
[2025-03-18 22:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711271,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:39:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711271,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711271', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:39:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711271', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:39:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:39:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:39:21] Production.INFO: ==15563== Releasing lock...  
[2025-03-18 22:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:39:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:40:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:40:06
    [end_date_ymd] => 2025-03-18 22:40:06
    [RateCDR] => 1
)
  
[2025-03-18 22:40:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:40:06' and `end` < '2025-03-18 22:40:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:40:18] Production.INFO: count ==1174  
[2025-03-18 22:40:19] Production.ERROR: pbx CDR StartTime 2025-03-18 19:40:06 - End Time 2025-03-18 22:40:06  
[2025-03-18 22:40:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711277', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711277', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711277', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:40:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711277', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:40:19] Production.INFO: ProcessCDR(1,14711277,1,1,2)  
[2025-03-18 22:40:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:40:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711277,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:40:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711277,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711277', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711277', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:40:22] Production.INFO: ==15696== Releasing lock...  
[2025-03-18 22:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:40:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:41:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:41:05
    [end_date_ymd] => 2025-03-18 22:41:05
    [RateCDR] => 1
)
  
[2025-03-18 22:41:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:41:05' and `end` < '2025-03-18 22:41:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:41:17] Production.INFO: count ==1185  
[2025-03-18 22:41:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:41:05 - End Time 2025-03-18 22:41:05  
[2025-03-18 22:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711282', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711282', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711282', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711282', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:41:18] Production.INFO: ProcessCDR(1,14711282,1,1,2)  
[2025-03-18 22:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711282,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711282,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711282', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711282', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:41:21] Production.INFO: ==15789== Releasing lock...  
[2025-03-18 22:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:41:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:42:05
    [end_date_ymd] => 2025-03-18 22:42:05
    [RateCDR] => 1
)
  
[2025-03-18 22:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:42:05' and `end` < '2025-03-18 22:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:42:17] Production.INFO: count ==1179  
[2025-03-18 22:42:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:42:05 - End Time 2025-03-18 22:42:05  
[2025-03-18 22:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711287', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711287', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711287', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711287', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:42:17] Production.INFO: ProcessCDR(1,14711287,1,1,2)  
[2025-03-18 22:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711287,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711287,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711287', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711287', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:42:21] Production.INFO: ==15877== Releasing lock...  
[2025-03-18 22:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:42:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:43:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:43:05
    [end_date_ymd] => 2025-03-18 22:43:05
    [RateCDR] => 1
)
  
[2025-03-18 22:43:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:43:05' and `end` < '2025-03-18 22:43:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:43:18] Production.INFO: count ==1178  
[2025-03-18 22:43:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:43:05 - End Time 2025-03-18 22:43:05  
[2025-03-18 22:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711292', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711292', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711292', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711292', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:43:18] Production.INFO: ProcessCDR(1,14711292,1,1,2)  
[2025-03-18 22:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:43:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711292,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:43:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:43:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711292,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711292', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:43:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711292', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:43:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:43:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:43:23] Production.INFO: ==15963== Releasing lock...  
[2025-03-18 22:43:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:43:23] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:44:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:44:05
    [end_date_ymd] => 2025-03-18 22:44:05
    [RateCDR] => 1
)
  
[2025-03-18 22:44:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:44:05' and `end` < '2025-03-18 22:44:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:44:17] Production.INFO: count ==1181  
[2025-03-18 22:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:44:05 - End Time 2025-03-18 22:44:05  
[2025-03-18 22:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711297', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711297', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711297', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711297', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:44:18] Production.INFO: ProcessCDR(1,14711297,1,1,2)  
[2025-03-18 22:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:44:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711297,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:44:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:44:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711297,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711297', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:44:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711297', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:44:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:44:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:44:21] Production.INFO: ==16060== Releasing lock...  
[2025-03-18 22:44:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:44:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:45:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:45:05
    [end_date_ymd] => 2025-03-18 22:45:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:45:05' and `end` < '2025-03-18 22:45:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:45:17] Production.INFO: count ==1180  
[2025-03-18 22:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:45:05 - End Time 2025-03-18 22:45:05  
[2025-03-18 22:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711302', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711302', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711302', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711302', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:45:18] Production.INFO: ProcessCDR(1,14711302,1,1,2)  
[2025-03-18 22:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:45:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711302,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:45:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:45:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711302,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711302', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:45:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711302', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:45:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:45:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:45:21] Production.INFO: ==16159== Releasing lock...  
[2025-03-18 22:45:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:45:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:46:05
    [end_date_ymd] => 2025-03-18 22:46:05
    [RateCDR] => 1
)
  
[2025-03-18 22:46:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:46:05' and `end` < '2025-03-18 22:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:46:17] Production.INFO: count ==1180  
[2025-03-18 22:46:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:46:05 - End Time 2025-03-18 22:46:05  
[2025-03-18 22:46:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711307', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711307', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711307', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:46:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711307', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:46:17] Production.INFO: ProcessCDR(1,14711307,1,1,2)  
[2025-03-18 22:46:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711307,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711307,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711307', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711307', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:46:21] Production.INFO: ==16253== Releasing lock...  
[2025-03-18 22:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:46:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:47:05
    [end_date_ymd] => 2025-03-18 22:47:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 19:47:05' and `end` < '2025-03-18 22: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-18 22:47:17] Production.INFO: count ==1176  
[2025-03-18 22:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:47:05 - End Time 2025-03-18 22:47:05  
[2025-03-18 22:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711312', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711312', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711312', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711312', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:47:18] Production.INFO: ProcessCDR(1,14711312,1,1,2)  
[2025-03-18 22:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711312,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711312,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711312', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711312', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:47:21] Production.INFO: ==16355== Releasing lock...  
[2025-03-18 22:47:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:47:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:48:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:48:06
    [end_date_ymd] => 2025-03-18 22:48:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:48:06' and `end` < '2025-03-18 22: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-18 22:48:19] Production.INFO: count ==1171  
[2025-03-18 22:48:19] Production.ERROR: pbx CDR StartTime 2025-03-18 19:48:06 - End Time 2025-03-18 22:48:06  
[2025-03-18 22:48:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711317', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711317', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711317', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:48:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711317', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:48:19] Production.INFO: ProcessCDR(1,14711317,1,1,2)  
[2025-03-18 22:48:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:48:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711317,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:48:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:48:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711317,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711317', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:48:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711317', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:48:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:48:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:48:23] Production.INFO: ==16450== Releasing lock...  
[2025-03-18 22:48:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:48:23] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:49:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:49:05
    [end_date_ymd] => 2025-03-18 22:49:05
    [RateCDR] => 1
)
  
[2025-03-18 22:49:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:49:05' and `end` < '2025-03-18 22:49:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:49:17] Production.INFO: count ==1166  
[2025-03-18 22:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:49:05 - End Time 2025-03-18 22:49:05  
[2025-03-18 22:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711322', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711322', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711322', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711322', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:49:18] Production.INFO: ProcessCDR(1,14711322,1,1,2)  
[2025-03-18 22:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711322,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:49:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711322,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711322', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:49:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711322', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:49:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:49:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:49:21] Production.INFO: ==16543== Releasing lock...  
[2025-03-18 22:49:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:49:21] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 22:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:50:06
    [end_date_ymd] => 2025-03-18 22:50:06
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:50:06' and `end` < '2025-03-18 22: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-18 22:50:18] Production.INFO: count ==1167  
[2025-03-18 22:50:19] Production.ERROR: pbx CDR StartTime 2025-03-18 19:50:06 - End Time 2025-03-18 22:50:06  
[2025-03-18 22:50:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711328', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711328', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711328', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:50:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711328', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:50:19] Production.INFO: ProcessCDR(1,14711328,1,1,2)  
[2025-03-18 22:50:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:50:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711328,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:50:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711328,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711328', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711328', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:50:22] Production.INFO: ==16646== Releasing lock...  
[2025-03-18 22:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:50:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:51:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:51:05
    [end_date_ymd] => 2025-03-18 22:51:05
    [RateCDR] => 1
)
  
[2025-03-18 22:51:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:51:05' and `end` < '2025-03-18 22:51:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:51:17] Production.INFO: count ==1152  
[2025-03-18 22:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:51:05 - End Time 2025-03-18 22:51:05  
[2025-03-18 22:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711333', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711333', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711333', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711333', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:51:18] Production.INFO: ProcessCDR(1,14711333,1,1,2)  
[2025-03-18 22:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:51:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711333,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:51:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:51:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711333,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711333', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:51:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711333', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:51:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:51:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:51:23] Production.INFO: ==16745== Releasing lock...  
[2025-03-18 22:51:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:51:23] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:52:05
    [end_date_ymd] => 2025-03-18 22:52:05
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:52:05' and `end` < '2025-03-18 22: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-18 22:52:18] Production.INFO: count ==1148  
[2025-03-18 22:52:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:52:05 - End Time 2025-03-18 22:52:05  
[2025-03-18 22:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711338', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711338', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711338', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711338', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:52:18] Production.INFO: ProcessCDR(1,14711338,1,1,2)  
[2025-03-18 22:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711338,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711338,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711338', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711338', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:52:22] Production.INFO: ==16843== Releasing lock...  
[2025-03-18 22:52:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:52:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:53:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:53:05
    [end_date_ymd] => 2025-03-18 22:53:05
    [RateCDR] => 1
)
  
[2025-03-18 22:53:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:53:05' and `end` < '2025-03-18 22:53:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:53:18] Production.INFO: count ==1161  
[2025-03-18 22:53:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:53:05 - End Time 2025-03-18 22:53:05  
[2025-03-18 22:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711343', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711343', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711343', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711343', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:53:18] Production.INFO: ProcessCDR(1,14711343,1,1,2)  
[2025-03-18 22:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711343,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:53:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711343,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711343', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:53:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711343', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:53:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:53:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:53:21] Production.INFO: ==16944== Releasing lock...  
[2025-03-18 22:53:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:53:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:54:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:54:06
    [end_date_ymd] => 2025-03-18 22:54:06
    [RateCDR] => 1
)
  
[2025-03-18 22:54:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:54:06' and `end` < '2025-03-18 22:54:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:54:18] Production.INFO: count ==1156  
[2025-03-18 22:54:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:54:06 - End Time 2025-03-18 22:54:06  
[2025-03-18 22:54:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:54:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711348', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711348', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711348', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:54:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711348', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:54:19] Production.INFO: ProcessCDR(1,14711348,1,1,2)  
[2025-03-18 22:54:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:54:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711348,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:54:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:54:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711348,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711348', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:54:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711348', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:54:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:54:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:54:22] Production.INFO: ==17038== Releasing lock...  
[2025-03-18 22:54:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:54:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:55:05
    [end_date_ymd] => 2025-03-18 22:55:05
    [RateCDR] => 1
)
  
[2025-03-18 22:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:55:05' and `end` < '2025-03-18 22:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:55:17] Production.INFO: count ==1156  
[2025-03-18 22:55:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:55:05 - End Time 2025-03-18 22:55:05  
[2025-03-18 22:55:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:55:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711353', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711353', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711353', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711353', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:55:18] Production.INFO: ProcessCDR(1,14711353,1,1,2)  
[2025-03-18 22:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711353,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711353,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711353', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711353', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:55:21] Production.INFO: ==17183== Releasing lock...  
[2025-03-18 22:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:55:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:56:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:56:06
    [end_date_ymd] => 2025-03-18 22:56:06
    [RateCDR] => 1
)
  
[2025-03-18 22:56:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:56:06' and `end` < '2025-03-18 22:56:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:56:18] Production.INFO: count ==1171  
[2025-03-18 22:56:19] Production.ERROR: pbx CDR StartTime 2025-03-18 19:56:06 - End Time 2025-03-18 22:56:06  
[2025-03-18 22:56:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711358', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711358', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711358', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:56:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711358', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:56:19] Production.INFO: ProcessCDR(1,14711358,1,1,2)  
[2025-03-18 22:56:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:56:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711358,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:56:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:56:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711358,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711358', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:56:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711358', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:56:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:56:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:56:22] Production.INFO: ==17284== Releasing lock...  
[2025-03-18 22:56:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:56:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:57:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:57:04
    [end_date_ymd] => 2025-03-18 22:57:04
    [RateCDR] => 1
)
  
[2025-03-18 22: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-18 19:57:04' and `end` < '2025-03-18 22: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-18 22:57:17] Production.INFO: count ==1167  
[2025-03-18 22:57:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:57:04 - End Time 2025-03-18 22:57:04  
[2025-03-18 22:57:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711363', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711363', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711363', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:57:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711363', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:57:17] Production.INFO: ProcessCDR(1,14711363,1,1,2)  
[2025-03-18 22:57:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:57:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711363,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:57:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:57:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711363,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711363', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:57:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711363', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:57:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:57:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:57:20] Production.INFO: ==17378== Releasing lock...  
[2025-03-18 22:57:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:57:20] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 22:58:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:58:06
    [end_date_ymd] => 2025-03-18 22:58:06
    [RateCDR] => 1
)
  
[2025-03-18 22:58:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:58:06' and `end` < '2025-03-18 22:58:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:58:18] Production.INFO: count ==1165  
[2025-03-18 22:58:18] Production.ERROR: pbx CDR StartTime 2025-03-18 19:58:06 - End Time 2025-03-18 22:58:06  
[2025-03-18 22:58:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711368', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711368', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711368', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:58:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711368', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:58:18] Production.INFO: ProcessCDR(1,14711368,1,1,2)  
[2025-03-18 22:58:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:58:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711368,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:58:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711368,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711368', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711368', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:58:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:58:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:58:22] Production.INFO: ==17471== Releasing lock...  
[2025-03-18 22:58:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:58:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 22:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 19:59:05
    [end_date_ymd] => 2025-03-18 22:59:05
    [RateCDR] => 1
)
  
[2025-03-18 22:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 19:59:05' and `end` < '2025-03-18 22:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 22:59:17] Production.INFO: count ==1157  
[2025-03-18 22:59:17] Production.ERROR: pbx CDR StartTime 2025-03-18 19:59:05 - End Time 2025-03-18 22:59:05  
[2025-03-18 22:59:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 22:59:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711373', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711373', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711373', 'tblTempVendorCDR_20' ) start  
[2025-03-18 22:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711373', 'tblTempVendorCDR_20' ) end  
[2025-03-18 22:59:18] Production.INFO: ProcessCDR(1,14711373,1,1,2)  
[2025-03-18 22:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711373,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 22:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711373,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 22:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711373', 'tblTempUsageDetail_20' ) start  
[2025-03-18 22:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711373', 'tblTempUsageDetail_20' ) end  
[2025-03-18 22:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 22:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 22:59:21] Production.INFO: ==17566== Releasing lock...  
[2025-03-18 22:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 22:59:21] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 23:00:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:00:06
    [end_date_ymd] => 2025-03-18 23:00:06
    [RateCDR] => 1
)
  
[2025-03-18 23:00:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:00:06' and `end` < '2025-03-18 23:00:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:00:18] Production.INFO: count ==1153  
[2025-03-18 23:00:19] Production.ERROR: pbx CDR StartTime 2025-03-18 20:00:06 - End Time 2025-03-18 23:00:06  
[2025-03-18 23:00:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711379', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711379', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711379', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:00:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711379', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:00:19] Production.INFO: ProcessCDR(1,14711379,1,1,2)  
[2025-03-18 23:00:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:00:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711379,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:00:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:00:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711379,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711379', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:00:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711379', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:00:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:00:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:00:23] Production.INFO: ==17675== Releasing lock...  
[2025-03-18 23:00:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:00:23] Production.INFO: 37.25 MB  #Memory Used#   
[2025-03-18 23:01:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:01:05
    [end_date_ymd] => 2025-03-18 23:01:05
    [RateCDR] => 1
)
  
[2025-03-18 23:01:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:01:05' and `end` < '2025-03-18 23:01:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:01:17] Production.INFO: count ==1093  
[2025-03-18 23:01:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:01:05 - End Time 2025-03-18 23:01:05  
[2025-03-18 23:01:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711384', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711384', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711384', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:01:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711384', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:01:17] Production.INFO: ProcessCDR(1,14711384,1,1,2)  
[2025-03-18 23:01:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:01:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711384,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:01:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:01:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711384,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711384', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:01:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711384', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:01:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:01:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:01:20] Production.INFO: ==17860== Releasing lock...  
[2025-03-18 23:01:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:01:20] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:02:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:02:05
    [end_date_ymd] => 2025-03-18 23:02:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:02:05' and `end` < '2025-03-18 23:02:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:02:18] Production.INFO: count ==1090  
[2025-03-18 23:02:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:02:05 - End Time 2025-03-18 23:02:05  
[2025-03-18 23:02:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711389', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711389', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711389', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:02:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711389', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:02:18] Production.INFO: ProcessCDR(1,14711389,1,1,2)  
[2025-03-18 23:02:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:02:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711389,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:02:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:02:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711389,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711389', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:02:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711389', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:02:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:02:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:02:22] Production.INFO: ==17962== Releasing lock...  
[2025-03-18 23:02:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:02:22] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:03:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:03:06
    [end_date_ymd] => 2025-03-18 23:03:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:03:06' and `end` < '2025-03-18 23: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-18 23:03:18] Production.INFO: count ==1092  
[2025-03-18 23:03:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:03:06 - End Time 2025-03-18 23:03:06  
[2025-03-18 23:03:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711394', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711394', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711394', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:03:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711394', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:03:18] Production.INFO: ProcessCDR(1,14711394,1,1,2)  
[2025-03-18 23:03:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:03:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711394,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:03:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:03:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711394,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711394', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:03:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711394', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:03:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:03:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:03:23] Production.INFO: ==18059== Releasing lock...  
[2025-03-18 23:03:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:03:23] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 23:04:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:04:05
    [end_date_ymd] => 2025-03-18 23:04:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:04:05' and `end` < '2025-03-18 23:04:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:04:17] Production.INFO: count ==1092  
[2025-03-18 23:04:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:04:05 - End Time 2025-03-18 23:04:05  
[2025-03-18 23:04:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711399', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711399', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711399', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:04:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711399', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:04:18] Production.INFO: ProcessCDR(1,14711399,1,1,2)  
[2025-03-18 23:04:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:04:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711399,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:04:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:04:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711399,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711399', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:04:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711399', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:04:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:04:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:04:21] Production.INFO: ==18156== Releasing lock...  
[2025-03-18 23:04:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:04:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 23:05:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:05:06
    [end_date_ymd] => 2025-03-18 23:05:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:05:06' and `end` < '2025-03-18 23: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-18 23:05:18] Production.INFO: count ==1090  
[2025-03-18 23:05:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:05:06 - End Time 2025-03-18 23:05:06  
[2025-03-18 23:05:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711404', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711404', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711404', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:05:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711404', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:05:18] Production.INFO: ProcessCDR(1,14711404,1,1,2)  
[2025-03-18 23:05:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:05:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711404,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:05:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:05:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711404,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711404', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:05:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711404', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:05:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:05:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:05:22] Production.INFO: ==18335== Releasing lock...  
[2025-03-18 23:05:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:05:22] Production.INFO: 37 MB  #Memory Used#   
[2025-03-18 23:06:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:06:06
    [end_date_ymd] => 2025-03-18 23:06:06
    [RateCDR] => 1
)
  
[2025-03-18 23:06:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:06:06' and `end` < '2025-03-18 23:06:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:06:18] Production.INFO: count ==1089  
[2025-03-18 23:06:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:06:06 - End Time 2025-03-18 23:06:06  
[2025-03-18 23:06:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711409', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711409', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711409', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:06:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711409', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:06:18] Production.INFO: ProcessCDR(1,14711409,1,1,2)  
[2025-03-18 23:06:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:06:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711409,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:06:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:06:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711409,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711409', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:06:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711409', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:06:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:06:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:06:22] Production.INFO: ==18429== Releasing lock...  
[2025-03-18 23:06:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:06:22] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:07:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:07:06
    [end_date_ymd] => 2025-03-18 23:07:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:07:06' and `end` < '2025-03-18 23: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-18 23:07:19] Production.INFO: count ==1084  
[2025-03-18 23:07:19] Production.ERROR: pbx CDR StartTime 2025-03-18 20:07:06 - End Time 2025-03-18 23:07:06  
[2025-03-18 23:07:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711414', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711414', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711414', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:07:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711414', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:07:19] Production.INFO: ProcessCDR(1,14711414,1,1,2)  
[2025-03-18 23:07:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:07:22] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711414,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:07:22] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:07:24] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711414,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711414', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:07:24] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711414', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:07:24] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:07:24] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:07:24] Production.INFO: ==18532== Releasing lock...  
[2025-03-18 23:07:24] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:07:24] Production.INFO: 36.25 MB  #Memory Used#   
[2025-03-18 23:08:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:08:05
    [end_date_ymd] => 2025-03-18 23:08:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:08:05' and `end` < '2025-03-18 23: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-18 23:08:18] Production.INFO: count ==1086  
[2025-03-18 23:08:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:08:05 - End Time 2025-03-18 23:08:05  
[2025-03-18 23:08:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711419', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711419', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711419', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:08:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711419', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:08:18] Production.INFO: ProcessCDR(1,14711419,1,1,2)  
[2025-03-18 23:08:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:08:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711419,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:08:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:08:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711419,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711419', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:08:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711419', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:08:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:08:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:08:21] Production.INFO: ==18701== Releasing lock...  
[2025-03-18 23:08:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:08:21] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:09:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:09:05
    [end_date_ymd] => 2025-03-18 23:09:05
    [RateCDR] => 1
)
  
[2025-03-18 23:09:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:09:05' and `end` < '2025-03-18 23:09:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:09:18] Production.INFO: count ==1086  
[2025-03-18 23:09:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:09:05 - End Time 2025-03-18 23:09:05  
[2025-03-18 23:09:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711424', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711424', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711424', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:09:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711424', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:09:18] Production.INFO: ProcessCDR(1,14711424,1,1,2)  
[2025-03-18 23:09:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:09:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711424,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:09:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:09:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711424,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711424', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:09:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711424', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:09:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:09:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:09:22] Production.INFO: ==18806== Releasing lock...  
[2025-03-18 23:09:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:09:22] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:10:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:10:05
    [end_date_ymd] => 2025-03-18 23:10:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:10:05' and `end` < '2025-03-18 23: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-18 23:10:18] Production.INFO: count ==1088  
[2025-03-18 23:10:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:10:05 - End Time 2025-03-18 23:10:05  
[2025-03-18 23:10:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711429', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711429', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711429', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:10:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711429', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:10:18] Production.INFO: ProcessCDR(1,14711429,1,1,2)  
[2025-03-18 23:10:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:10:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711429,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:10:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:10:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711429,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711429', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:10:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711429', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:10:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:10:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:10:23] Production.INFO: ==18905== Releasing lock...  
[2025-03-18 23:10:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:10:23] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 23:11:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:11:06
    [end_date_ymd] => 2025-03-18 23:11:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:11:06' and `end` < '2025-03-18 23: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-18 23:11:18] Production.INFO: count ==1071  
[2025-03-18 23:11:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:11:06 - End Time 2025-03-18 23:11:06  
[2025-03-18 23:11:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711435', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711435', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711435', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:11:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711435', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:11:18] Production.INFO: ProcessCDR(1,14711435,1,1,2)  
[2025-03-18 23:11:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:11:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711435,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:11:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:11:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711435,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711435', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:11:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711435', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:11:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:11:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:11:23] Production.INFO: ==19042== Releasing lock...  
[2025-03-18 23:11:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:11:23] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:12:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:12:06
    [end_date_ymd] => 2025-03-18 23:12:06
    [RateCDR] => 1
)
  
[2025-03-18 23:12:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:12:06' and `end` < '2025-03-18 23:12:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:12:18] Production.INFO: count ==1075  
[2025-03-18 23:12:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:12:06 - End Time 2025-03-18 23:12:06  
[2025-03-18 23:12:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711440', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711440', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711440', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:12:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711440', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:12:18] Production.INFO: ProcessCDR(1,14711440,1,1,2)  
[2025-03-18 23:12:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:12:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711440,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:12:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:12:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711440,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711440', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:12:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711440', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:12:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:12:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:12:22] Production.INFO: ==19221== Releasing lock...  
[2025-03-18 23:12:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:12:22] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:13:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:13:05
    [end_date_ymd] => 2025-03-18 23:13:05
    [RateCDR] => 1
)
  
[2025-03-18 23:13:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:13:05' and `end` < '2025-03-18 23:13:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:13:18] Production.INFO: count ==1074  
[2025-03-18 23:13:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:13:05 - End Time 2025-03-18 23:13:05  
[2025-03-18 23:13:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711445', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711445', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711445', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:13:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711445', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:13:18] Production.INFO: ProcessCDR(1,14711445,1,1,2)  
[2025-03-18 23:13:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:13:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711445,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:13:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:13:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711445,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711445', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:13:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711445', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:13:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:13:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:13:21] Production.INFO: ==19316== Releasing lock...  
[2025-03-18 23:13:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:13:21] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:14:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:14:05
    [end_date_ymd] => 2025-03-18 23:14:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:14:05' and `end` < '2025-03-18 23: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-18 23:14:17] Production.INFO: count ==1072  
[2025-03-18 23:14:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:14:05 - End Time 2025-03-18 23:14:05  
[2025-03-18 23:14:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711450', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711450', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711450', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:14:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711450', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:14:18] Production.INFO: ProcessCDR(1,14711450,1,1,2)  
[2025-03-18 23:14:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:14:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711450,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:14:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:14:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711450,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711450', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:14:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711450', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:14:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:14:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:14:21] Production.INFO: ==19413== Releasing lock...  
[2025-03-18 23:14:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:14:21] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:15:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:15:05
    [end_date_ymd] => 2025-03-18 23:15:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:15:05' and `end` < '2025-03-18 23: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-18 23:15:17] Production.INFO: count ==1072  
[2025-03-18 23:15:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:15:05 - End Time 2025-03-18 23:15:05  
[2025-03-18 23:15:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711455', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711455', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711455', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:15:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711455', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:15:17] Production.INFO: ProcessCDR(1,14711455,1,1,2)  
[2025-03-18 23:15:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:15:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711455,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:15:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:15:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711455,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711455', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:15:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711455', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:15:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:15:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:15:21] Production.INFO: ==19598== Releasing lock...  
[2025-03-18 23:15:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:15:21] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:16:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:16:06
    [end_date_ymd] => 2025-03-18 23:16:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:16:06' and `end` < '2025-03-18 23: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-18 23:16:18] Production.INFO: count ==1073  
[2025-03-18 23:16:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:16:06 - End Time 2025-03-18 23:16:06  
[2025-03-18 23:16:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711460', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711460', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711460', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:16:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711460', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:16:18] Production.INFO: ProcessCDR(1,14711460,1,1,2)  
[2025-03-18 23:16:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:16:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711460,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:16:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:16:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711460,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711460', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:16:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711460', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:16:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:16:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:16:22] Production.INFO: ==19690== Releasing lock...  
[2025-03-18 23:16:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:16:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:17:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:17:05
    [end_date_ymd] => 2025-03-18 23:17:05
    [RateCDR] => 1
)
  
[2025-03-18 23:17:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:17:05' and `end` < '2025-03-18 23:17:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:17:17] Production.INFO: count ==1066  
[2025-03-18 23:17:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:17:05 - End Time 2025-03-18 23:17:05  
[2025-03-18 23:17:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711465', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711465', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711465', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:17:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711465', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:17:17] Production.INFO: ProcessCDR(1,14711465,1,1,2)  
[2025-03-18 23:17:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:17:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711465,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:17:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:17:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711465,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711465', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:17:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711465', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:17:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:17:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:17:21] Production.INFO: ==19781== Releasing lock...  
[2025-03-18 23:17:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:17:21] Production.INFO: 36.25 MB  #Memory Used#   
[2025-03-18 23:18:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:18:06
    [end_date_ymd] => 2025-03-18 23:18:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:18:06' and `end` < '2025-03-18 23: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-18 23:18:18] Production.INFO: count ==1063  
[2025-03-18 23:18:19] Production.ERROR: pbx CDR StartTime 2025-03-18 20:18:06 - End Time 2025-03-18 23:18:06  
[2025-03-18 23:18:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711470', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711470', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711470', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:18:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711470', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:18:19] Production.INFO: ProcessCDR(1,14711470,1,1,2)  
[2025-03-18 23:18:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:18:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711470,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:18:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:18:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711470,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711470', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:18:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711470', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:18:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:18:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:18:22] Production.INFO: ==19879== Releasing lock...  
[2025-03-18 23:18:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:18:22] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:19:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:19:05
    [end_date_ymd] => 2025-03-18 23:19:05
    [RateCDR] => 1
)
  
[2025-03-18 23:19:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:19:05' and `end` < '2025-03-18 23:19:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:19:17] Production.INFO: count ==1057  
[2025-03-18 23:19:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:19:05 - End Time 2025-03-18 23:19:05  
[2025-03-18 23:19:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711475', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711475', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711475', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:19:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711475', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:19:18] Production.INFO: ProcessCDR(1,14711475,1,1,2)  
[2025-03-18 23:19:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:19:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711475,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:19:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:19:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711475,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711475', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:19:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711475', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:19:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:19:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:19:21] Production.INFO: ==19972== Releasing lock...  
[2025-03-18 23:19:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:19:21] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:20:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:20:06
    [end_date_ymd] => 2025-03-18 23:20:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:20:06' and `end` < '2025-03-18 23: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-18 23:20:18] Production.INFO: count ==1054  
[2025-03-18 23:20:19] Production.ERROR: pbx CDR StartTime 2025-03-18 20:20:06 - End Time 2025-03-18 23:20:06  
[2025-03-18 23:20:19] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711481', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711481', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711481', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:20:19] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711481', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:20:19] Production.INFO: ProcessCDR(1,14711481,1,1,2)  
[2025-03-18 23:20:19] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:20:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711481,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:20:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:20:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711481,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711481', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:20:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711481', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:20:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:20:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:20:22] Production.INFO: ==20063== Releasing lock...  
[2025-03-18 23:20:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:20:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:21:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:21:05
    [end_date_ymd] => 2025-03-18 23:21:05
    [RateCDR] => 1
)
  
[2025-03-18 23:21:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:21:05' and `end` < '2025-03-18 23:21:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:21:17] Production.INFO: count ==1017  
[2025-03-18 23:21:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:21:05 - End Time 2025-03-18 23:21:05  
[2025-03-18 23:21:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711486', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711486', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711486', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:21:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711486', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:21:17] Production.INFO: ProcessCDR(1,14711486,1,1,2)  
[2025-03-18 23:21:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:21:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711486,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:21:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:21:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711486,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711486', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:21:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711486', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:21:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:21:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:21:21] Production.INFO: ==20157== Releasing lock...  
[2025-03-18 23:21:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:21:21] Production.INFO: 36.25 MB  #Memory Used#   
[2025-03-18 23:22:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:22:06
    [end_date_ymd] => 2025-03-18 23:22:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:22:06' and `end` < '2025-03-18 23: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-18 23:22:18] Production.INFO: count ==1018  
[2025-03-18 23:22:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:22:06 - End Time 2025-03-18 23:22:06  
[2025-03-18 23:22:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711491', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711491', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711491', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:22:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711491', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:22:18] Production.INFO: ProcessCDR(1,14711491,1,1,2)  
[2025-03-18 23:22:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:22:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711491,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:22:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:22:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711491,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711491', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:22:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711491', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:22:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:22:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:22:22] Production.INFO: ==20247== Releasing lock...  
[2025-03-18 23:22:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:22:22] Production.INFO: 36.25 MB  #Memory Used#   
[2025-03-18 23:23:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:23:05
    [end_date_ymd] => 2025-03-18 23:23:05
    [RateCDR] => 1
)
  
[2025-03-18 23:23:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:23:05' and `end` < '2025-03-18 23:23:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:23:17] Production.INFO: count ==1015  
[2025-03-18 23:23:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:23:05 - End Time 2025-03-18 23:23:05  
[2025-03-18 23:23:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711496', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711496', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711496', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:23:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711496', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:23:17] Production.INFO: ProcessCDR(1,14711496,1,1,2)  
[2025-03-18 23:23:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:23:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711496,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:23:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:23:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711496,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711496', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:23:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711496', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:23:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:23:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:23:21] Production.INFO: ==20341== Releasing lock...  
[2025-03-18 23:23:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:23:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 23:24:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:24:05
    [end_date_ymd] => 2025-03-18 23:24:05
    [RateCDR] => 1
)
  
[2025-03-18 23:24:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:24:05' and `end` < '2025-03-18 23:24:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:24:18] Production.INFO: count ==1015  
[2025-03-18 23:24:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:24:05 - End Time 2025-03-18 23:24:05  
[2025-03-18 23:24:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711501', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711501', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711501', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:24:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711501', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:24:18] Production.INFO: ProcessCDR(1,14711501,1,1,2)  
[2025-03-18 23:24:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:24:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711501,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:24:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:24:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711501,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711501', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:24:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711501', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:24:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:24:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:24:21] Production.INFO: ==20429== Releasing lock...  
[2025-03-18 23:24:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:24:21] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 23:25:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:25:05
    [end_date_ymd] => 2025-03-18 23:25:05
    [RateCDR] => 1
)
  
[2025-03-18 23:25:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:25:05' and `end` < '2025-03-18 23:25:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:25:17] Production.INFO: count ==1012  
[2025-03-18 23:25:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:25:05 - End Time 2025-03-18 23:25:05  
[2025-03-18 23:25:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711506', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711506', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711506', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:25:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711506', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:25:17] Production.INFO: ProcessCDR(1,14711506,1,1,2)  
[2025-03-18 23:25:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:25:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711506,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:25:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:25:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711506,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711506', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:25:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711506', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:25:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:25:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:25:21] Production.INFO: ==20517== Releasing lock...  
[2025-03-18 23:25:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:25:21] Production.INFO: 35.75 MB  #Memory Used#   
[2025-03-18 23:26:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:26:06
    [end_date_ymd] => 2025-03-18 23:26:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:26:06' and `end` < '2025-03-18 23: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-18 23:26:18] Production.INFO: count ==1011  
[2025-03-18 23:26:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:26:06 - End Time 2025-03-18 23:26:06  
[2025-03-18 23:26:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711511', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711511', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711511', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:26:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711511', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:26:18] Production.INFO: ProcessCDR(1,14711511,1,1,2)  
[2025-03-18 23:26:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:26:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711511,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:26:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:26:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711511,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711511', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:26:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711511', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:26:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:26:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:26:22] Production.INFO: ==20645== Releasing lock...  
[2025-03-18 23:26:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:26:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:27:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:27:05
    [end_date_ymd] => 2025-03-18 23:27:05
    [RateCDR] => 1
)
  
[2025-03-18 23:27:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:27:05' and `end` < '2025-03-18 23:27:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:27:17] Production.INFO: count ==1016  
[2025-03-18 23:27:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:27:05 - End Time 2025-03-18 23:27:05  
[2025-03-18 23:27:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711516', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711516', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711516', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:27:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711516', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:27:18] Production.INFO: ProcessCDR(1,14711516,1,1,2)  
[2025-03-18 23:27:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:27:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711516,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:27:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:27:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711516,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711516', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:27:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711516', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:27:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:27:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:27:21] Production.INFO: ==20731== Releasing lock...  
[2025-03-18 23:27:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:27:21] Production.INFO: 36.5 MB  #Memory Used#   
[2025-03-18 23:28:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:28:06
    [end_date_ymd] => 2025-03-18 23:28:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:28:06' and `end` < '2025-03-18 23: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-18 23:28:18] Production.INFO: count ==1017  
[2025-03-18 23:28:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:28:06 - End Time 2025-03-18 23:28:06  
[2025-03-18 23:28:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711521', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711521', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711521', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:28:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711521', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:28:18] Production.INFO: ProcessCDR(1,14711521,1,1,2)  
[2025-03-18 23:28:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:28:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711521,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:28:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:28:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711521,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711521', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:28:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711521', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:28:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:28:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:28:22] Production.INFO: ==20824== Releasing lock...  
[2025-03-18 23:28:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:28:22] Production.INFO: 36.75 MB  #Memory Used#   
[2025-03-18 23:29:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:29:05
    [end_date_ymd] => 2025-03-18 23:29:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:29:05' and `end` < '2025-03-18 23:29:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:29:17] Production.INFO: count ==1015  
[2025-03-18 23:29:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:29:05 - End Time 2025-03-18 23:29:05  
[2025-03-18 23:29:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711526', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711526', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711526', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:29:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711526', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:29:17] Production.INFO: ProcessCDR(1,14711526,1,1,2)  
[2025-03-18 23:29:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:29:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711526,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:29:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:29:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711526,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711526', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:29:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711526', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:29:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:29:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:29:21] Production.INFO: ==20913== Releasing lock...  
[2025-03-18 23:29:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:29:21] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:30:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:30:06
    [end_date_ymd] => 2025-03-18 23:30:06
    [RateCDR] => 1
)
  
[2025-03-18 23:30:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:30:06' and `end` < '2025-03-18 23:30:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:30:18] Production.INFO: count ==1010  
[2025-03-18 23:30:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:30:06 - End Time 2025-03-18 23:30:06  
[2025-03-18 23:30:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711532', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711532', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711532', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:30:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711532', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:30:18] Production.INFO: ProcessCDR(1,14711532,1,1,2)  
[2025-03-18 23:30:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:30:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711532,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:30:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:30:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711532,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711532', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:30:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711532', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:30:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:30:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:30:22] Production.INFO: ==21003== Releasing lock...  
[2025-03-18 23:30:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:30:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:31:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:31:05
    [end_date_ymd] => 2025-03-18 23:31:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:31:05' and `end` < '2025-03-18 23:31:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:31:17] Production.INFO: count ==1023  
[2025-03-18 23:31:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:31:05 - End Time 2025-03-18 23:31:05  
[2025-03-18 23:31:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711537', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711537', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711537', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:31:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711537', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:31:17] Production.INFO: ProcessCDR(1,14711537,1,1,2)  
[2025-03-18 23:31:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:31:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711537,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:31:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:31:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711537,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711537', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:31:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711537', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:31:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:31:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:31:22] Production.INFO: ==21096== Releasing lock...  
[2025-03-18 23:31:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:31:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:32:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:32:05
    [end_date_ymd] => 2025-03-18 23:32:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:32:05' and `end` < '2025-03-18 23: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-18 23:32:18] Production.INFO: count ==1011  
[2025-03-18 23:32:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:32:05 - End Time 2025-03-18 23:32:05  
[2025-03-18 23:32:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711542', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711542', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711542', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:32:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711542', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:32:18] Production.INFO: ProcessCDR(1,14711542,1,1,2)  
[2025-03-18 23:32:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:32:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711542,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:32:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:32:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711542,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711542', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:32:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711542', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:32:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:32:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:32:21] Production.INFO: ==21184== Releasing lock...  
[2025-03-18 23:32:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:32:21] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:33:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:33:05
    [end_date_ymd] => 2025-03-18 23:33:05
    [RateCDR] => 1
)
  
[2025-03-18 23:33:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:33:05' and `end` < '2025-03-18 23:33:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:33:17] Production.INFO: count ==1000  
[2025-03-18 23:33:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:33:05 - End Time 2025-03-18 23:33:05  
[2025-03-18 23:33:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711547', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711547', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711547', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:33:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711547', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:33:17] Production.INFO: ProcessCDR(1,14711547,1,1,2)  
[2025-03-18 23:33:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:33:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711547,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:33:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:33:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711547,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711547', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:33:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711547', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:33:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:33:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:33:20] Production.INFO: ==21271== Releasing lock...  
[2025-03-18 23:33:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:33:20] Production.INFO: 36.25 MB  #Memory Used#   
[2025-03-18 23:34:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:34:05
    [end_date_ymd] => 2025-03-18 23:34:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:34:05' and `end` < '2025-03-18 23: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-18 23:34:17] Production.INFO: count ==983  
[2025-03-18 23:34:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:34:05 - End Time 2025-03-18 23:34:05  
[2025-03-18 23:34:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711552', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711552', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711552', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:34:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711552', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:34:17] Production.INFO: ProcessCDR(1,14711552,1,1,2)  
[2025-03-18 23:34:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:34:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711552,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:34:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:34:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711552,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711552', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:34:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711552', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:34:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:34:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:34:21] Production.INFO: ==21368== Releasing lock...  
[2025-03-18 23:34:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:34:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:35:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:35:04
    [end_date_ymd] => 2025-03-18 23:35:04
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:35:04' and `end` < '2025-03-18 23:35:04'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:35:17] Production.INFO: count ==970  
[2025-03-18 23:35:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:35:04 - End Time 2025-03-18 23:35:04  
[2025-03-18 23:35:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711557', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711557', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711557', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:35:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711557', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:35:17] Production.INFO: ProcessCDR(1,14711557,1,1,2)  
[2025-03-18 23:35:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:35:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711557,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:35:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:35:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711557,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711557', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:35:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711557', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:35:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:35:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:35:20] Production.INFO: ==21456== Releasing lock...  
[2025-03-18 23:35:20] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:35:20] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:36:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:36:06
    [end_date_ymd] => 2025-03-18 23:36:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:36:06' and `end` < '2025-03-18 23: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-18 23:36:18] Production.INFO: count ==965  
[2025-03-18 23:36:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:36:06 - End Time 2025-03-18 23:36:06  
[2025-03-18 23:36:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711562', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711562', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711562', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:36:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711562', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:36:18] Production.INFO: ProcessCDR(1,14711562,1,1,2)  
[2025-03-18 23:36:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:36:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711562,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:36:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:36:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711562,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711562', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:36:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711562', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:36:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:36:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:36:21] Production.INFO: ==21552== Releasing lock...  
[2025-03-18 23:36:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:36:21] Production.INFO: 35.75 MB  #Memory Used#   
[2025-03-18 23:37:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:37:05
    [end_date_ymd] => 2025-03-18 23:37:05
    [RateCDR] => 1
)
  
[2025-03-18 23:37:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:37:05' and `end` < '2025-03-18 23:37:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:37:18] Production.INFO: count ==968  
[2025-03-18 23:37:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:37:05 - End Time 2025-03-18 23:37:05  
[2025-03-18 23:37:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711567', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711567', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711567', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:37:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711567', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:37:18] Production.INFO: ProcessCDR(1,14711567,1,1,2)  
[2025-03-18 23:37:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:37:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711567,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:37:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:37:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711567,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711567', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:37:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711567', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:37:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:37:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:37:21] Production.INFO: ==21646== Releasing lock...  
[2025-03-18 23:37:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:37:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:38:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:38:05
    [end_date_ymd] => 2025-03-18 23:38:05
    [RateCDR] => 1
)
  
[2025-03-18 23:38:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:38:05' and `end` < '2025-03-18 23:38:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:38:17] Production.INFO: count ==967  
[2025-03-18 23:38:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:38:05 - End Time 2025-03-18 23:38:05  
[2025-03-18 23:38:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711572', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711572', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711572', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:38:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711572', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:38:17] Production.INFO: ProcessCDR(1,14711572,1,1,2)  
[2025-03-18 23:38:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:38:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711572,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:38:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:38:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711572,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711572', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:38:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711572', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:38:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:38:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:38:22] Production.INFO: ==21744== Releasing lock...  
[2025-03-18 23:38:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:38:22] Production.INFO: 35.25 MB  #Memory Used#   
[2025-03-18 23:39:04] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:39:04
    [end_date_ymd] => 2025-03-18 23:39:04
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:39:04' and `end` < '2025-03-18 23: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-18 23:39:17] Production.INFO: count ==967  
[2025-03-18 23:39:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:39:04 - End Time 2025-03-18 23:39:04  
[2025-03-18 23:39:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711577', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711577', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711577', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:39:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711577', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:39:17] Production.INFO: ProcessCDR(1,14711577,1,1,2)  
[2025-03-18 23:39:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:39:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711577,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:39:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:39:20] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711577,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711577', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:39:20] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711577', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:39:20] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:39:20] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:39:21] Production.INFO: ==21838== Releasing lock...  
[2025-03-18 23:39:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:39:21] Production.INFO: 35.25 MB  #Memory Used#   
[2025-03-18 23:40:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:40:05
    [end_date_ymd] => 2025-03-18 23:40:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:40:05' and `end` < '2025-03-18 23: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-18 23:40:17] Production.INFO: count ==973  
[2025-03-18 23:40:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:40:05 - End Time 2025-03-18 23:40:05  
[2025-03-18 23:40:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:40:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711583', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711583', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711583', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:40:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711583', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:40:18] Production.INFO: ProcessCDR(1,14711583,1,1,2)  
[2025-03-18 23:40:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:40:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711583,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:40:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:40:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711583,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711583', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:40:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711583', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:40:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:40:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:40:22] Production.INFO: ==21935== Releasing lock...  
[2025-03-18 23:40:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:40:22] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:41:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:41:06
    [end_date_ymd] => 2025-03-18 23:41:06
    [RateCDR] => 1
)
  
[2025-03-18 23:41:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:41:06' and `end` < '2025-03-18 23:41:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:41:18] Production.INFO: count ==965  
[2025-03-18 23:41:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:41:06 - End Time 2025-03-18 23:41:06  
[2025-03-18 23:41:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711588', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711588', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711588', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:41:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711588', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:41:18] Production.INFO: ProcessCDR(1,14711588,1,1,2)  
[2025-03-18 23:41:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:41:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711588,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:41:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:41:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711588,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711588', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:41:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711588', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:41:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:41:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:41:21] Production.INFO: ==22033== Releasing lock...  
[2025-03-18 23:41:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:41:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:42:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:42:05
    [end_date_ymd] => 2025-03-18 23:42:05
    [RateCDR] => 1
)
  
[2025-03-18 23:42:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:42:05' and `end` < '2025-03-18 23:42:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:42:17] Production.INFO: count ==964  
[2025-03-18 23:42:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:42:05 - End Time 2025-03-18 23:42:05  
[2025-03-18 23:42:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711593', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711593', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711593', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:42:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711593', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:42:17] Production.INFO: ProcessCDR(1,14711593,1,1,2)  
[2025-03-18 23:42:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:42:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711593,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:42:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:42:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711593,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711593', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:42:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711593', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:42:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:42:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:42:21] Production.INFO: ==22174== Releasing lock...  
[2025-03-18 23:42:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:42:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:43:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:43:06
    [end_date_ymd] => 2025-03-18 23:43:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:43:06' and `end` < '2025-03-18 23: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-18 23:43:18] Production.INFO: count ==964  
[2025-03-18 23:43:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:43:06 - End Time 2025-03-18 23:43:06  
[2025-03-18 23:43:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711598', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711598', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711598', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:43:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711598', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:43:18] Production.INFO: ProcessCDR(1,14711598,1,1,2)  
[2025-03-18 23:43:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:43:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711598,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:43:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:43:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711598,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:43:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711598', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:43:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711598', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:43:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:43:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:43:22] Production.INFO: ==22267== Releasing lock...  
[2025-03-18 23:43:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:43:22] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:44:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:44:06
    [end_date_ymd] => 2025-03-18 23:44:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:44:06' and `end` < '2025-03-18 23: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-18 23:44:18] Production.INFO: count ==964  
[2025-03-18 23:44:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:44:06 - End Time 2025-03-18 23:44:06  
[2025-03-18 23:44:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711603', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711603', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711603', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:44:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711603', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:44:18] Production.INFO: ProcessCDR(1,14711603,1,1,2)  
[2025-03-18 23:44:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:44:21] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711603,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:44:21] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:44:23] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711603,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711603', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:44:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711603', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:44:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:44:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:44:23] Production.INFO: ==22366== Releasing lock...  
[2025-03-18 23:44:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:44:23] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:45:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:45:06
    [end_date_ymd] => 2025-03-18 23:45:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:45:06' and `end` < '2025-03-18 23: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-18 23:45:18] Production.INFO: count ==962  
[2025-03-18 23:45:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:45:06 - End Time 2025-03-18 23:45:06  
[2025-03-18 23:45:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711608', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711608', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711608', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:45:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711608', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:45:18] Production.INFO: ProcessCDR(1,14711608,1,1,2)  
[2025-03-18 23:45:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:45:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711608,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:45:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:45:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711608,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711608', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:45:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711608', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:45:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:45:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:45:22] Production.INFO: ==22468== Releasing lock...  
[2025-03-18 23:45:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:45:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:46:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:46:05
    [end_date_ymd] => 2025-03-18 23:46:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:46:05' and `end` < '2025-03-18 23:46:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:46:17] Production.INFO: count ==965  
[2025-03-18 23:46:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:46:05 - End Time 2025-03-18 23:46:05  
[2025-03-18 23:46:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711613', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711613', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711613', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:46:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711613', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:46:18] Production.INFO: ProcessCDR(1,14711613,1,1,2)  
[2025-03-18 23:46:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:46:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711613,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:46:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:46:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711613,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711613', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:46:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711613', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:46:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:46:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:46:21] Production.INFO: ==22559== Releasing lock...  
[2025-03-18 23:46:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:46:21] Production.INFO: 35.75 MB  #Memory Used#   
[2025-03-18 23:47:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:47:05
    [end_date_ymd] => 2025-03-18 23:47:05
    [RateCDR] => 1
)
  
[2025-03-18 23:47:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:47:05' and `end` < '2025-03-18 23:47:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:47:18] Production.INFO: count ==968  
[2025-03-18 23:47:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:47:05 - End Time 2025-03-18 23:47:05  
[2025-03-18 23:47:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711618', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711618', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711618', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:47:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711618', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:47:18] Production.INFO: ProcessCDR(1,14711618,1,1,2)  
[2025-03-18 23:47:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:47:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711618,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:47:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:47:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711618,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711618', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:47:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711618', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:47:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:47:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:47:22] Production.INFO: ==22656== Releasing lock...  
[2025-03-18 23:47:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:47:22] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:48:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:48:05
    [end_date_ymd] => 2025-03-18 23:48:05
    [RateCDR] => 1
)
  
[2025-03-18 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-18 20:48:05' and `end` < '2025-03-18 23:48:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:48:17] Production.INFO: count ==966  
[2025-03-18 23:48:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:48:05 - End Time 2025-03-18 23:48:05  
[2025-03-18 23:48:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711623', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711623', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711623', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:48:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711623', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:48:18] Production.INFO: ProcessCDR(1,14711623,1,1,2)  
[2025-03-18 23:48:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:48:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711623,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:48:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:48:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711623,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711623', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:48:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711623', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:48:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:48:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:48:21] Production.INFO: ==22748== Releasing lock...  
[2025-03-18 23:48:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:48:21] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:49:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:49:06
    [end_date_ymd] => 2025-03-18 23:49:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:49:06' and `end` < '2025-03-18 23: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-18 23:49:18] Production.INFO: count ==963  
[2025-03-18 23:49:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:49:06 - End Time 2025-03-18 23:49:06  
[2025-03-18 23:49:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711628', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711628', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711628', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:49:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711628', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:49:18] Production.INFO: ProcessCDR(1,14711628,1,1,2)  
[2025-03-18 23:49:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:49:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711628,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:49:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:49:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711628,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711628', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:49:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711628', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:49:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:49:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:49:22] Production.INFO: ==22847== Releasing lock...  
[2025-03-18 23:49:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:49:22] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:50:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:50:06
    [end_date_ymd] => 2025-03-18 23:50:06
    [RateCDR] => 1
)
  
[2025-03-18 23:50:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:50:06' and `end` < '2025-03-18 23:50:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:50:18] Production.INFO: count ==963  
[2025-03-18 23:50:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:50:06 - End Time 2025-03-18 23:50:06  
[2025-03-18 23:50:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711634', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711634', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711634', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:50:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711634', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:50:18] Production.INFO: ProcessCDR(1,14711634,1,1,2)  
[2025-03-18 23:50:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:50:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711634,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:50:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:50:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711634,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711634', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:50:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711634', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:50:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:50:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:50:22] Production.INFO: ==22944== Releasing lock...  
[2025-03-18 23:50:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:50:22] Production.INFO: 36 MB  #Memory Used#   
[2025-03-18 23:51:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:51:06
    [end_date_ymd] => 2025-03-18 23:51:06
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:51:06' and `end` < '2025-03-18 23: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-18 23:51:18] Production.INFO: count ==939  
[2025-03-18 23:51:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:51:06 - End Time 2025-03-18 23:51:06  
[2025-03-18 23:51:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711639', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711639', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711639', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:51:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711639', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:51:18] Production.INFO: ProcessCDR(1,14711639,1,1,2)  
[2025-03-18 23:51:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:51:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711639,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:51:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:51:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711639,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711639', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:51:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711639', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:51:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:51:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:51:22] Production.INFO: ==23049== Releasing lock...  
[2025-03-18 23:51:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:51:22] Production.INFO: 35.5 MB  #Memory Used#   
[2025-03-18 23:52:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:52:05
    [end_date_ymd] => 2025-03-18 23:52:05
    [RateCDR] => 1
)
  
[2025-03-18 23:52:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:52:05' and `end` < '2025-03-18 23:52:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:52:18] Production.INFO: count ==936  
[2025-03-18 23:52:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:52:05 - End Time 2025-03-18 23:52:05  
[2025-03-18 23:52:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711644', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711644', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711644', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:52:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711644', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:52:18] Production.INFO: ProcessCDR(1,14711644,1,1,2)  
[2025-03-18 23:52:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:52:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711644,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:52:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:52:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711644,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711644', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:52:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711644', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:52:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:52:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:52:21] Production.INFO: ==23139== Releasing lock...  
[2025-03-18 23:52:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:52:21] Production.INFO: 35.25 MB  #Memory Used#   
[2025-03-18 23:53:06] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:53:06
    [end_date_ymd] => 2025-03-18 23:53:06
    [RateCDR] => 1
)
  
[2025-03-18 23:53:06] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:53:06' and `end` < '2025-03-18 23:53:06'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:53:18] Production.INFO: count ==927  
[2025-03-18 23:53:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:53:06 - End Time 2025-03-18 23:53:06  
[2025-03-18 23:53:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711649', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711649', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711649', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:53:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711649', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:53:18] Production.INFO: ProcessCDR(1,14711649,1,1,2)  
[2025-03-18 23:53:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:53:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711649,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:53:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:53:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711649,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711649', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:53:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711649', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:53:22] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:53:22] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:53:22] Production.INFO: ==23244== Releasing lock...  
[2025-03-18 23:53:22] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:53:22] Production.INFO: 34.75 MB  #Memory Used#   
[2025-03-18 23:54:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:54:05
    [end_date_ymd] => 2025-03-18 23:54:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:54:05' and `end` < '2025-03-18 23: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-18 23:54:17] Production.INFO: count ==925  
[2025-03-18 23:54:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:54:05 - End Time 2025-03-18 23:54:05  
[2025-03-18 23:54:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711654', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711654', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711654', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:54:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711654', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:54:17] Production.INFO: ProcessCDR(1,14711654,1,1,2)  
[2025-03-18 23:54:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:54:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711654,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:54:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:54:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711654,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711654', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:54:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711654', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:54:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:54:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:54:21] Production.INFO: ==23337== Releasing lock...  
[2025-03-18 23:54:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:54:21] Production.INFO: 35 MB  #Memory Used#   
[2025-03-18 23:55:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:55:05
    [end_date_ymd] => 2025-03-18 23:55:05
    [RateCDR] => 1
)
  
[2025-03-18 23:55:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:55:05' and `end` < '2025-03-18 23:55:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:55:18] Production.INFO: count ==925  
[2025-03-18 23:55:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:55:05 - End Time 2025-03-18 23:55:05  
[2025-03-18 23:55:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711659', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711659', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711659', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:55:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711659', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:55:18] Production.INFO: ProcessCDR(1,14711659,1,1,2)  
[2025-03-18 23:55:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:55:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711659,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:55:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:55:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711659,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711659', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:55:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711659', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:55:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:55:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:55:21] Production.INFO: ==23433== Releasing lock...  
[2025-03-18 23:55:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:55:21] Production.INFO: 35 MB  #Memory Used#   
[2025-03-18 23:56:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:56:05
    [end_date_ymd] => 2025-03-18 23:56:05
    [RateCDR] => 1
)
  
[2025-03-18 23:56:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:56:05' and `end` < '2025-03-18 23:56:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:56:17] Production.INFO: count ==924  
[2025-03-18 23:56:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:56:05 - End Time 2025-03-18 23:56:05  
[2025-03-18 23:56:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711664', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711664', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711664', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:56:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711664', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:56:17] Production.INFO: ProcessCDR(1,14711664,1,1,2)  
[2025-03-18 23:56:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:56:18] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711664,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:56:18] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:56:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711664,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711664', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:56:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711664', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:56:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:56:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:56:21] Production.INFO: ==23521== Releasing lock...  
[2025-03-18 23:56:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:56:21] Production.INFO: 35 MB  #Memory Used#   
[2025-03-18 23:57:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:57:05
    [end_date_ymd] => 2025-03-18 23:57:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:57:05' and `end` < '2025-03-18 23: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-18 23:57:18] Production.INFO: count ==924  
[2025-03-18 23:57:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:57:05 - End Time 2025-03-18 23:57:05  
[2025-03-18 23:57:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711669', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711669', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711669', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:57:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711669', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:57:18] Production.INFO: ProcessCDR(1,14711669,1,1,2)  
[2025-03-18 23:57:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:57:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711669,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:57:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:57:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711669,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711669', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:57:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711669', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:57:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:57:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:57:21] Production.INFO: ==23661== Releasing lock...  
[2025-03-18 23:57:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:57:21] Production.INFO: 35 MB  #Memory Used#   
[2025-03-18 23:58:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:58:05
    [end_date_ymd] => 2025-03-18 23:58:05
    [RateCDR] => 1
)
  
[2025-03-18 23: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-18 20:58:05' and `end` < '2025-03-18 23: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-18 23:58:17] Production.INFO: count ==925  
[2025-03-18 23:58:17] Production.ERROR: pbx CDR StartTime 2025-03-18 20:58:05 - End Time 2025-03-18 23:58:05  
[2025-03-18 23:58:17] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711674', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711674', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711674', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:58:17] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711674', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:58:17] Production.INFO: ProcessCDR(1,14711674,1,1,2)  
[2025-03-18 23:58:17] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:58:20] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711674,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:58:20] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:58:22] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711674,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:58:22] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711674', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:58:23] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711674', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:58:23] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:58:23] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:58:23] Production.INFO: ==23736== Releasing lock...  
[2025-03-18 23:58:23] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:58:23] Production.INFO: 35.25 MB  #Memory Used#   
[2025-03-18 23:59:05] Production.ERROR: Array
(
    [start_date_ymd] => 2025-03-18 20:59:05
    [end_date_ymd] => 2025-03-18 23:59:05
    [RateCDR] => 1
)
  
[2025-03-18 23:59:05] Production.INFO: select c.src, c.ID,c.`start`,c.`end`,c.duration,c.billsec,c.realsrc as extension,c.accountcode,
                    c.firstdst,c.lastdst,coalesce(sum(cc_cost)) as cc_cost,c.pincode, c.userfield,IFNULL(cc_type ,'') as cc_type,
                    disposition,IFNULL(p.pr_name,'') as cc_peername,IFNULL(cc.cc_buy,'') as cc_buy, ex.ex_name,ex.ex_description, 
                    pin.pc_description as pincode_name
                    from asteriskcdrdb.cdr c										
                    left outer join asterisk.cc_callcosts cc on
                     c.uniqueid=cc.cc_uniqueid and ( c.sequence=cc.cc_cdr_sequence or (c.sequence is null and cc.cc_cdr_sequence=0 ) ) /*-- Given by mirta same as in their front end.*/
                     left outer join asterisk.pr_providers p on
                     cc_pr_id = pr_id
					left outer join asterisk.te_tenants te ON te.te_code = c.accountcode
                    left outer join asterisk.ex_extensions ex ON CONCAT(ex.ex_number, '-', te.te_code) = c.realsrc and ex.ex_te_id = te.te_id
					left outer join asterisk.pc_pincodes pin ON pin.pc_pin = c.pincode	
                    where `end` >= '2025-03-18 20:59:05' and `end` < '2025-03-18 23:59:05'
                    AND (
                           userfield like '%outbound%'
                        or userfield like '%inbound%'
                        or ( userfield = '' AND  IFNULL(cc_type ,'') <> 'OUTNOCHARGE' )  /*-- Ignore Internal call*/
                        )
                    AND ( dst<>'h' or duration <> 0 ) /*-- given by mirta*/
                    AND IFNULL(cc_type ,'') <> 'OUTNOCHARGE'
                    and prevuniqueid=''
                    group by ID,c.`start`,c.`end`,realsrc,firstdst,duration,billsec,userfield,uniqueid,prevuniqueid,lastdst,dst,pincode,IFNULL(cc_type ,'')
                      
[2025-03-18 23:59:18] Production.INFO: count ==928  
[2025-03-18 23:59:18] Production.ERROR: pbx CDR StartTime 2025-03-18 20:59:05 - End Time 2025-03-18 23:59:05  
[2025-03-18 23:59:18] Production.ERROR:  ========================== pbx transaction end =============================  
[2025-03-18 23:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711679', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID ('1','1' , '14711679', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711679', 'tblTempVendorCDR_20' ) start  
[2025-03-18 23:59:18] Production.INFO: CALL  prc_DeleteDuplicateUniqueID2 ('1','1' , '14711679', 'tblTempVendorCDR_20' ) end  
[2025-03-18 23:59:18] Production.INFO: ProcessCDR(1,14711679,1,1,2)  
[2025-03-18 23:59:18] Production.ERROR: start CALL  prc_ProcesssVCDR( 1,1,14711679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:59:19] Production.ERROR: end CALL  prc_ProcesssVCDR( 1,1,14711679,'tblTempVendorCDR_20',1,2,'','CurrentRate','0','0')  
[2025-03-18 23:59:19] Production.ERROR: start CALL  prc_ProcesssCDR( 1,1,14711679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:59:21] Production.ERROR: end CALL  prc_ProcesssCDR( 1,1,14711679,'tblTempUsageDetail_20',1,2,'','CurrentRate','0','0','0','0')  
[2025-03-18 23:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711679', 'tblTempUsageDetail_20' ) start  
[2025-03-18 23:59:21] Production.ERROR: PBX CALL  prc_ProcessDiscountPlan ('14711679', 'tblTempUsageDetail_20' ) end  
[2025-03-18 23:59:21] Production.ERROR: pbx prc_insertCDR start  
[2025-03-18 23:59:21] Production.ERROR: pbx prc_insertCDR end  
[2025-03-18 23:59:21] Production.INFO: ==23816== Releasing lock...  
[2025-03-18 23:59:21] Production.INFO: pbxaccountusage-command-pbxaccountusage-companyid-1-cronjobid-16 #Stops#   
[2025-03-18 23:59:21] Production.INFO: 35 MB  #Memory Used#